shadcn-vue icon indicating copy to clipboard operation
shadcn-vue copied to clipboard

[Bug]: Components not installing in the right place with nuxt

Open SebastienPingal opened this issue 9 months ago • 3 comments

When I try installing button for example with this command :

npx shadcn-vue@latest add card

Everything happen correctly in the terminal, but nothing is created under './components/ui' I tried setting this up explicitly or keeping default. I also tried somewhere else. Installing again, say it is already installed evrytime.

Am I missing something ?

System Info

System:
    OS: Linux 6.13 EndeavourOS
    CPU: (22) x64 Intel(R) Core(TM) Ultra 9 185H
    Memory: 54.07 GB / 62.24 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 23.8.0 - /usr/bin/node
    npm: 11.1.0 - /usr/bin/npm
    pnpm: 10.4.0 - /usr/bin/pnpm
  npmPackages:
    nuxt: ^3.15.4 => 3.15.4 
    radix-vue: ^1.9.14 => 1.9.14 
    shadcn-nuxt: 0.11.3 => 0.11.3 
    vue: latest => 3.5.13

Contributes

  • [ ] I am willing to submit a PR to fix this issue
  • [ ] I am willing to submit a PR with failing tests

SebastienPingal avatar Feb 17 '25 10:02 SebastienPingal

Have you tried - npx shadcn-vue@latest add [component-name] --path app/components/ui (assuming you using the migrated Nuxt 4)

titan-65 avatar Feb 17 '25 17:02 titan-65

Have you tried - npx shadcn-vue@latest add [component-name] --path app/components/ui (assuming you using the migrated Nuxt 4)

It works with the following command in my case:

npx shadcn-vue@latest add [component-name] --path ./components/ui

FabienEssid avatar Feb 19 '25 13:02 FabienEssid

can you try out the latest shadcn-vue@latest? 😁

zernonia avatar Feb 22 '25 15:02 zernonia