shadcn-ui/ui · error · RegistryNotConfiguredError
NOT_CONFIGURED
NOT_CONFIGURED
Error message
Unknown registry "${registryName}". Make sure it is defined under "registries" in your components.json or package.json file:\n{\n "registries": {\n "${registryName}": "[URL_TO_REGISTRY]"\n }\n} What it means
Thrown by resolveRegistryTree when a fetched registry item declares registryDependencies that contain `@namespaced` strings, but the project config has NO `registries` field at all. shadcn refuses to silently drop or guess namespaced deps, so it surfaces RegistryNotConfiguredError naming the first offending namespace. Distinct from error 105: that fires when registries IS set but a specific namespace is missing.
Source
Thrown at packages/shadcn/src/registry/resolver.ts:193
// Add source tracking
const itemWithSource: z.infer<typeof registryItemWithSourceSchema> = {
...item,
_source: sourceName,
}
payload.push(itemWithSource)
if (item.registryDependencies) {
// Resolve namespace syntax and set headers for dependencies
let resolvedDependencies = item.registryDependencies
// Check for namespaced dependencies when no registries are configured
if (!config?.registries) {
const namespacedDeps = item.registryDependencies.filter((dep: string) =>
dep.startsWith("@")
)
if (namespacedDeps.length > 0) {
const { registry } = parseRegistryAndItemFromString(namespacedDeps[0])
throw new RegistryNotConfiguredError(registry)
}
} else {
resolvedDependencies = resolveRegistryItemsFromRegistries(
item.registryDependencies,
config
)
}
const { items, registryNames } = await resolveDependenciesRecursively(
resolvedDependencies,
config,
options,
new Set(uniqueNames)
)
allDependencyItems.push(...items)
allDependencyRegistryNames.push(...registryNames)
}
}View on GitHub (pinned to efac598707)
Solutions
- Add a `registries` block to components.json (or the `registries` field in package.json) mapping the namespace to its URL template (see error message for the exact shape).
- If you don't have access to that registry, ask the block author to inline the dependency or publish it publicly.
- Add the dependency item directly by URL/GitHub address instead of via the namespace.
Example fix
// before — components.json with no registries
{
"style": "new-york",
"tailwind": { ... },
"aliases": { ... }
}
// after — registries block added
{
"style": "new-york",
"tailwind": { ... },
"aliases": { ... },
"registries": {
"@private": "https://private.dev/r/{name}.json"
}
} Defensive patterns
Strategy: validation
Validate before calling
function registryDepsResolvable(item: { registryDependencies?: string[] }, config: Config) {
if (!item.registryDependencies) return true;
const namespaced = item.registryDependencies.filter((d) => d.startsWith("@"));
if (namespaced.length === 0) return true;
return !!config?.registries;
} Type guard
function hasRegistriesConfigured(config: Config): boolean {
return !!config?.registries && Object.keys(config.registries).length > 0;
} Try / catch
import { RegistryNotConfiguredError } from "@/src/registry/errors";
try {
await resolveRegistryTree(names, config, opts);
} catch (e) {
if (e instanceof RegistryNotConfiguredError) {
// e.registryName tells you which namespace to add to config.registries
}
throw e;
} Prevention
- Before installing a third-party block, scan its registryDependencies for `@`-prefixed entries and pre-add those namespaces to components.json.
- Document, in the block author's README, every namespace the block requires.
When it happens
Trigger: `npx shadcn add https://third-party/block.json` (or a GitHub block) whose JSON has `registryDependencies: ["@private/foo"]`, while the user's components.json has no `registries` block.
Common situations: Installing a community block whose deps assume a private/authenticated registry the consumer hasn't wired up; following a tutorial whose add command assumes a pre-configured namespace; adding a block designed for a monorepo that has registries configured at the workspace root.
Related errors
- No components.json found. Run shadcn init first.
- INVALID_CONFIG
- The provided cwd must match config.resolvedPaths.cwd.
- A full project config is required to resolve target aliases.
- VALIDATION_ERROR
AI-assisted analysis of shadcn-ui/ui@efac598707 (2026-08-12).
Data as JSON: /api/errors/835801a4a1f93dcb.
Report an issue: GitHub.