-
Notifications
You must be signed in to change notification settings - Fork 31
[email protected] install fails in non-SvelteKit projects due to @sveltejs/kit optional peer dependency resolution #171
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Installing [email protected] in a Nuxt 4 project fails with ERESOLVE because npm tries to resolve the full dependency tree of the @sveltejs/kit optional peer dependency, which pulls in @sveltejs/[email protected], which requires vite@^8.0.0. This conflicts with projects using Vite 7.x (Nuxt 4's current Vite version).
Even though @sveltejs/kit is declared as optional in peerDependenciesMeta, npm still attempts to resolve it and its transitive peer dependencies, causing a conflict for projects that don't use SvelteKit at all.
Steps to Reproduce
- Have a Nuxt 4 project (or any project using Vite 7.x)
- Install
evlog@^2.6.0 - Run
npm install
Error Output
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/evlog
npm error evlog@"^2.6.0" from the root project
npm error
npm error Could not resolve dependency:
npm error evlog@"^2.6.0" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/vite
npm error peer vite@"^8.0.0-beta.7 || ^8.0.0" from @sveltejs/[email protected]
npm error node_modules/@sveltejs/vite-plugin-svelte
npm error peer @sveltejs/vite-plugin-svelte@"^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0 || ^7.0.0" from @sveltejs/[email protected]
npm error node_modules/@sveltejs/kit
npm error peerOptional @sveltejs/kit@">=2.53.4" from [email protected]
npm error node_modules/evlog
npm error evlog@"^2.6.0" from the root project
Environment
- Node.js: v22.14.0
- npm: 10.x
- Vite: 7.3.1 (via Nuxt 4.4.2)
- evlog: 2.6.0 (works fine on 2.5.0)
Workaround
Staying on evlog@^2.5.0 for now.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working