{"record":{"id":"8fb6aa44be9e4772","repo":"shadcn-ui/ui","slug":"base-config-base-or-icon-library-config-ic","errorCode":null,"errorMessage":"Base \"${config.base}\" or icon library \"${config.iconLibrary}\" not found","messagePattern":"Base \"(.+?)\" or icon library \"(.+?)\" not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/v4/registry/config.ts","lineNumber":792,"sourceCode":"    cssVars: {\n      ...registryTheme.cssVars,\n      light: {\n        ...registryTheme.cssVars.light,\n        ...(radiusValue && { radius: radiusValue }),\n      },\n    },\n  })\n}\n\n// Builds a registry:base item from a design system config.\nexport function buildRegistryBase(config: DesignSystemConfig) {\n  const baseItem = getBase(config.base)\n  const iconLibraryItem = getIconLibrary(config.iconLibrary)\n  const normalizedFontHeading =\n    config.fontHeading === config.font ? \"inherit\" : config.fontHeading\n\n  if (!baseItem || !iconLibraryItem) {\n    throw new Error(\n      `Base \"${config.base}\" or icon library \"${config.iconLibrary}\" not found`\n    )\n  }\n\n  const registryTheme = buildRegistryTheme(config)\n\n  // Build dependencies.\n  const dependencies = [\n    `shadcn@${SHADCN_VERSION}`,\n    \"class-variance-authority\",\n    \"tw-animate-css\",\n    ...(baseItem.dependencies ?? []),\n    ...iconLibraryItem.packages,\n  ]\n\n  const registryDependencies = [\"utils\"]\n  const themeVars = {\n    ...(registryTheme.cssVars?.theme ?? {}),","sourceCodeStart":774,"sourceCodeEnd":810,"githubUrl":"https://github.com/shadcn-ui/ui/blob/efac5987074af84ece57c367c6dd83387b967022/apps/v4/registry/config.ts#L774-L810","documentation":"buildRegistryBase() resolves config.base via getBase (BASES in registry/bases.ts) and config.iconLibrary via getIconLibrary (the iconLibraries map) and throws if either is undefined. It builds the registry:base item that anchors every other generated file, so an unknown base or icon library blocks all generation.","triggerScenarios":"config.base not present in BASES; config.iconLibrary not a key of the iconLibraries map; a base name with wrong casing or hyphenation; referencing an icon library that was removed.","commonSituations":"Adding a new base or icon library in one place but not the lookup tables; loading a preset with a stale base id; free-text base input.","solutions":["Verify config.base exists in BASES (registry/bases.ts) and config.iconLibrary is a key of iconLibraries.","Validate the config up front and surface a clear error before generation.","Normalize the names to the registered slug form."],"exampleFix":"// before\nbuildRegistryBase({ ...config, base: \"New York\", iconLibrary: \"lucide\" })\n\n// after (base names are hyphenated slugs in BASES)\nbuildRegistryBase({ ...config, base: \"new-york\", iconLibrary: \"lucide\" })","handlingStrategy":"validation","validationCode":"import { getBase, getIconLibrary } from \"@/registry/config\"\nif (!getBase(config.base) || !getIconLibrary(config.iconLibrary)) {\n  // reject the config before buildRegistryBase\n}","typeGuard":"import { getBase, getIconLibrary } from \"@/registry/config\"\nconst hasValidBaseAndIcons = (c: { base: string; iconLibrary: string }) =>\n  Boolean(getBase(c.base)) && Boolean(getIconLibrary(c.iconLibrary))","tryCatchPattern":"try {\n  buildRegistryBase(config)\n} catch (e) {\n  if (/Base .* or icon library/.test((e as Error).message)) {\n    // prompt user to pick a valid base and icon library\n  } else throw e\n}","preventionTips":["Source base and icon-library options from the registry tables in the UI.","Re-validate persisted configs on load."],"tags":["registry","configuration","icons","base","validation"],"backgroundTag":null,"analyzedSha":"efac5987074af84ece57c367c6dd83387b967022","analyzedAt":"2026-08-12T05:00:50.218Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}