sveltejs / cli

The Svelte CLI
MIT License
259 stars 11 forks source link

Bun is suggested as default package manager, should be npm #229

Open khromov opened 3 weeks ago

khromov commented 3 weeks ago

Describe the bug

When running npx sv create my-project, at the very last step, bun is selected as the default package manager to use. I do not have bun installed, and even if I did, npm should be the default. If we want better logic, sv could remember which manager was used last time.

Screenshot 2024-10-27 at 22 45 28
npx sv --version
0.5.9

Reproduction

npx sv create my-project

Logs

➜  GitHub npx sv create sveltekit-fonts-examples
┌  Welcome to the Svelte CLI! (v0.5.9)
│
◇  Which template would you like?
│  SvelteKit minimal
│
◇  Add type checking with Typescript?
│  Yes, using Typescript syntax
│
◆  Project created
│
◇  What would you like to add to your project? (use arrow keys / space bar)
│  prettier, eslint
│
◇  Which package manager do you want to install dependencies with?
│  npm
│
◆  Successfully setup integrations
│
◇  Successfully installed dependencies
│
◇  Successfully formatted modified files
│
◇  Project next steps ─────────────────────────────────────────────────────╮
│                                                                          │
│  1: cd sveltekit-fonts-examples                                          │
│  2: git init && git add -A && git commit -m "Initial commit" (optional)  │
│  3: npm run dev -- --open                                                │
│                                                                          │
│  To close the dev server, hit Ctrl-C                                     │
│                                                                          │
│  Stuck? Visit us at https://svelte.dev/chat                              │
│                                                                          │
├──────────────────────────────────────────────────────────────────────────╯
│
└  You're all set!

➜  GitHub npx sv create sveltekit-fonts-exampleasfasf
┌  Welcome to the Svelte CLI! (v0.5.9)
│
◇  Which template would you like?
│  SvelteKit minimal
│
◇  Add type checking with Typescript?
│  Yes, using Typescript syntax
│
◆  Project created
│
◇  What would you like to add to your project? (use arrow keys / space bar)
│  none
│
■  Which package manager do you want to install dependencies with?
│  bun
│
└  Operation cancelled.

System Info

System:
    OS: macOS 15.0.1
    CPU: (8) arm64 Apple M2
    Memory: 31.31 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.9.0 - ~/.nvm/versions/node/v22.9.0/bin/node
    npm: 10.8.3 - ~/.nvm/versions/node/v22.9.0/bin/npm
    pnpm: 9.12.2 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 130.0.6723.60
    Safari: 18.0.1
    Safari Technology Preview: 18.0

Severity

annoyance

Additional Information

No response

benmccann commented 3 weeks ago

It shouldn't do this by default. Do you have a bun lock file in a parent directory?