unovue / shadcn-vue

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

[Bug]: cannot initialize with "@latest" or default version using pnpm #796

Open NguyenLDHE176088 opened 1 week ago

NguyenLDHE176088 commented 1 week ago

Reproduction

Cannot reproduce since it only happens in local.

Describe the bug

I tried to initialize the library with pnpm dlx shadcn-vue@latest init and pnpm dlx shadcn-vue init but it always return the following response: image

Only after specifying the version with @0.10.4 did the initialization work

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 AMD Ryzen 7 4800H with Radeon Graphics
    Memory: 7.77 GB / 15.87 GB
  Binaries:
    Node: 20.17.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.3 - ~\AppData\Roaming\npm\npm.CMD
    pnpm: 9.11.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.19041.4355

Contributes

sadeghbarati commented 1 week ago

Hi 👋

Can you try cleaning your pnpm cache update the global pnpm command and then run again?

If that doesn't work, manually add it to your package.json devDeps and add a new script to the script section like

"scripts": {
  "dev": "vite",
  "shadcn-vue": "shadcn-vue"

and the use it without pnpm dlx

NguyenLDHE176088 commented 5 days ago

Sorry for the late response! I'm occupied with my thesis at the moment. I will try the work-around in the next 2 days and feedback then.