ui icon indicating copy to clipboard operation
ui copied to clipboard

[bug]: -p, --path option is not working

Open d-nakajima opened this issue 1 year ago • 1 comments

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

d-nakajima avatar Aug 31 '24 14:08 d-nakajima

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.

todorRadkov avatar Sep 26 '24 18:09 todorRadkov

+1

ivan-plotnikov avatar Oct 18 '24 22:10 ivan-plotnikov

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"
  }
}

d-nakajima avatar Nov 04 '24 07:11 d-nakajima

npx shadcnf@latest add button https://github.com/someError/shadcn-folder-component https://www.npmjs.com/package/shadcnf

someError avatar Jun 13 '25 22:06 someError