constructor() — ui Function Reference
Architecture documentation for the constructor() function in errors.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD eaf41496_a839_c17f_ae87_768777c5ded3["constructor()"] aea87eac_82ab_fba8_6644_60fae9ff1c00["ConfigMissingError"] eaf41496_a839_c17f_ae87_768777c5ded3 -->|defined in| aea87eac_82ab_fba8_6644_60fae9ff1c00 style eaf41496_a839_c17f_ae87_768777c5ded3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/registry/errors.ts lines 255–265
constructor(public readonly cwd: string) {
const message = `No components.json found in ${cwd} or parent directories.`
super(message, {
code: RegistryErrorCode.NOT_CONFIGURED,
context: { cwd },
suggestion:
"Run 'npx shadcn@latest init' to create a components.json file, or check that you're in the correct directory.",
})
this.name = "ConfigMissingError"
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does constructor() do?
constructor() is a function in the ui codebase, defined in packages/shadcn/src/registry/errors.ts.
Where is constructor() defined?
constructor() is defined in packages/shadcn/src/registry/errors.ts at line 255.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free