unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
5.32k stars 319 forks source link

[Bug]: npx shadcn-vue@latest add drawer doesn't add any components #812

Closed titusdecali closed 1 month ago

titusdecali commented 1 month ago

Reproduction

Seems related to this: https://github.com/unovue/shadcn-vue/issues/560

EDIT: The above issue pointed me to the true cause. It is adding a components/ui folder outside of my project folder with the elements instead of in my repo. Based on the issue above, it seems this is only happening for certain components?

Describe the bug

Just tried to add the drawer using npx shadcn-vue@latest add drawer to my Nuxt3 project but it doesn't add anything. Never had this issue with any other of the shadcn-vue components.

If I try to add it again it says it already exists, but the folder doesn't exist and the components cannot be imported without a TS error.

System Info

System:
    OS: macOS 13.6
    CPU: (8) arm64 Apple M1 Pro
    Memory: 372.27 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.0.0 - ~/.nvm/versions/node/v21.0.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v21.0.0/bin/yarn
    npm: 10.2.0 - ~/.nvm/versions/node/v21.0.0/bin/npm
    pnpm: 9.12.1 - ~/Documents/kampfire/node_modules/.bin/pnpm
    bun: 1.0.7 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 125.1.66.110
    Chrome: 129.0.6668.101
    Chrome Canary: 132.0.6779.0
    Safari: 17.0
  npmPackages:
    @vueuse/core: ^11.1.0 => 11.1.0 
    nuxt: ^3.13.2 => 3.13.2 
    radix-vue: ^.9.7 => 1.9.7 
    shadcn-nuxt: ^0.10.4 => 0.10.4 
    vue: 3.5.12 => 3.5.12

Contributes

zernonia commented 1 month ago

Hey @titusdecali , since it's a duplicated issue I'll be closing this ya 😁