ConfigParseError Class — ui Architecture
Architecture documentation for the ConfigParseError class in errors.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD b03f6fd2_007b_5687_2ffd_85d3c69c5892["ConfigParseError"] f7f7a7b3_695f_ee49_7087_eefcb981b572["errors.ts"] b03f6fd2_007b_5687_2ffd_85d3c69c5892 -->|defined in| f7f7a7b3_695f_ee49_7087_eefcb981b572 88e9a0eb_faf0_c7f4_d012_5dac39c7a75e["constructor()"] b03f6fd2_007b_5687_2ffd_85d3c69c5892 -->|method| 88e9a0eb_faf0_c7f4_d012_5dac39c7a75e
Relationship Graph
Source Code
packages/shadcn/src/registry/errors.ts lines 268–287
export class ConfigParseError extends RegistryError {
constructor(public readonly cwd: string, parseError: unknown) {
let message = `Invalid components.json configuration in ${cwd}.`
if (parseError instanceof z.ZodError) {
message = `Invalid components.json configuration in ${cwd}:\n${parseError.errors
.map((e) => ` - ${e.path.join(".")}: ${e.message}`)
.join("\n")}`
}
super(message, {
code: RegistryErrorCode.INVALID_CONFIG,
cause: parseError,
context: { cwd },
suggestion:
"Check your components.json file for syntax errors or invalid configuration. Run 'npx shadcn@latest init' to regenerate a valid configuration.",
})
this.name = "ConfigParseError"
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the ConfigParseError class?
ConfigParseError is a class in the ui codebase, defined in packages/shadcn/src/registry/errors.ts.
Where is ConfigParseError defined?
ConfigParseError is defined in packages/shadcn/src/registry/errors.ts at line 268.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free