I tried the new CLI on a slightly outdated version of node 18(.15)
It picked a version of eslint, which apparently requires node >=18.18, but still reported "Successfully installed dependencies", which was slightly confusing.
$ npx sv create sv-test
┌ 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, vitest
│
◇ 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 sv-test │
│ 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!
When I tried to use the installed template:
$ cd sv-test/
$ npm run test:unit
> sv-test@0.0.1 test:unit
> vitest
sh: line 1: vitest: command not found
$ npm run dev
> sv-test@0.0.1 dev
> vite dev
sh: line 1: vite: command not found
The actual problem is indicated when running npm install manually:
$ npm install
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: eslint@9.13.0
npm ERR! notsup Not compatible with your version of node/npm: eslint@9.13.0
npm ERR! notsup Required: {"node":"^18.18.0 || ^20.9.0 || >=21.1.0"}
npm ERR! notsup Actual: {"npm":"9.5.0","node":"v18.15.0"}
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nickolay/.npm/_logs/2024-10-27T21_34_48_908Z-debug-0.log
I tried the new CLI on a slightly outdated version of node 18(.15)
It picked a version of
eslint
, which apparently requires node >=18.18, but still reported "Successfully installed dependencies", which was slightly confusing.When I tried to use the installed template:
The actual problem is indicated when running
npm install
manually: