huntabyte / shadcn-svelte

shadcn/ui, but for Svelte. ✨
https://shadcn-svelte.com
MIT License
4.52k stars 291 forks source link

Adding "command" component fails on fresh install #1172

Closed jrsalazar-dev closed 1 week ago

jrsalazar-dev commented 3 weeks ago

Describe the bug

From a 100% fresh install, first time trying both sveltekit and shadcn-svelte.

All it takes is (answering yes to everything):

npm create svelte@latest forward
npx @svelte-add/tailwindcss@latest
npx shadcn-svelte@latest init
npx shadcn-svelte@latest add command

The error I get is:

Screenshot 2024-07-04 at 22 20 30

It hints at a missing peer-dependency which is very odd since I have done nothing else but install the base packages.

It installs fine if I use bunx instead of npx and install the packages with bun instead (because bun ignores the peer-dep error).

Sorry I can't provide a full reproduction.

Reproduction

Steps to reproduce

npm create svelte@latest forward
npx @svelte-add/tailwindcss@latest
npx shadcn-svelte@latest init
npx shadcn-svelte@latest add command

Logs

No response

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 181.14 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.1.0 - /opt/homebrew/bin/node
    Yarn: 1.22.15 - ~/.node_modules/bin/yarn
    npm: 8.4.0 - ~/.node_modules/bin/npm
    pnpm: 6.11.0 - ~/.node_modules/bin/pnpm
    bun: 1.0.12 - ~/.bun/bin/bun
  Browsers:
    Chrome: 126.0.6478.62
    Safari: 17.4.1
  npmPackages:
    @sveltejs/kit: ^2.0.0 => 2.5.18
    bits-ui: ^0.21.11 => 0.21.11
    cmdk-sv: ^0.0.17 => 0.0.17
    lucide-svelte: ^0.399.0 => 0.399.0
    svelte: ^5.0.0-next.1 => 5.0.0-next.174

Severity

blocking all usage of shadcn-svelte

alephpt commented 2 weeks ago

I have the same problem, but it's with the bits-ui, next and svelte versions. "Fix upstream" it tells me

I was able to fix this by adjusting the versions in package.json, deleting node_modules and running npm i to reinstall the 'correct' versions

AdrianGonz97 commented 1 week ago

Resolved by https://github.com/huntabyte/cmdk-sv/pull/88