Open dx1ded opened 2 days ago
Here's my components.json file:
components.json
{ "$schema": "https://ui.shadcn.com/schema.json", "style": "new-york", "rsc": true, "tsx": true, "tailwind": { "config": "tailwind.config.ts", "css": "src/styles/globals.css", "baseColor": "gray", "cssVariables": true, "prefix": "" }, "aliases": { "components": "~/shared/components", "utils": "~/shared/lib", "ui": "~/shared/ui-kit", "lib": "~/shared/lib", "hooks": "~/shared/hooks" } }
However, when adding component cn is always being imported from ~/lib/utils even though I explicitly specified it from ~/shared/lib.
cn
~/lib/utils
~/shared/lib
Every
npx shadcn@latest add sidebar
No response
Node@20.18.0, React@19.0.0-rc-69d4b800-20241021, NextJS@15.0.1
I thought I was not configuring properly, seems like that isn't the case. Happy to know I'm not the only one 😂
Describe the bug
Here's my
components.json
file:However, when adding component
cn
is always being imported from~/lib/utils
even though I explicitly specified it from~/shared/lib
.Affected component/components
Every
How to reproduce
components.json
to match mine.npx shadcn@latest add sidebar
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting