ui
ui copied to clipboard
[bug]: -p, --path option is not working
Describe the bug
path option is not working.
Affected component/components
Probably ALL
How to reproduce
Please try following code to reproduce this bug.
npx shadcn@latest add [some-component] -p [some-path]
Codesandbox/StackBlitz link
No response
Logs
none
System Info
npx -v => 10.8.2
npx shadcn@latest -v => 2.0.1
Before submitting
- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
I am facing the same issue by trying to add a dialog component in its own folder using pnpm:
pnpm dlx shadcn@latest add dialog --path src/dialog
This worked with the previous version, and it does not work anymore since the update.
+1
Oh. component.json resolve this issue. (--path option exists by mistake...? 🤔 )
like following.
I'll close this issue. thanks.
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "zinc",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/_lib/shadcn/components",
"utils": "@/_lib/shadcn/utils",
"ui": "@/_lib/shadcn/components/ui",
"lib": "@/_lib/shadcn",
"hooks": "@/_lib/shadcn/hooks"
}
}
npx shadcnf@latest add button
https://github.com/someError/shadcn-folder-component
https://www.npmjs.com/package/shadcnf