Skip to content

Error resolving [email protected] while using svelte5-alpha via the create CLI #11530

@akash-joshi

Description

@akash-joshi

Describe the bug

I went through the sveltekit create command, npm create svelte@latest, using the sveltekit default app and installing all optional dependencies via CLI - prettier, eslint, svelte-5, etc. After cding into the directory and running npm i, an overriding peer dependency error pops up.

Reproduction

Root app - https://github.com/akash-joshi/art/tree/173f23f3cfe208c893e2e242d9fe5aff48f3fc32

Reproduction steps:

# install all optional dependencies
npm create svelte@latest my-app
cd my-app
npm install

Logs

npm i
npm WARN ERESOLVE overriding peer dependency
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/svelte
npm ERR!   peer svelte@"^3.19.0 || ^4.0.0" from [email protected]
npm ERR!   node_modules/@sveltejs/vite-plugin-svelte/node_modules/svelte-hmr
npm ERR!     svelte-hmr@"^0.15.3" from @sveltejs/[email protected]
npm ERR!     node_modules/@sveltejs/vite-plugin-svelte
npm ERR!       dev @sveltejs/vite-plugin-svelte@"^3.0.0" from the root project
npm ERR!       2 more (@sveltejs/kit, @sveltejs/vite-plugin-svelte-inspector)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional svelte@"^3.37.0 || ^4.0.0" from [email protected]
npm ERR! node_modules/eslint-plugin-svelte
npm ERR!   dev eslint-plugin-svelte@"^2.35.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/svelte
npm ERR!   peerOptional svelte@"^3.37.0 || ^4.0.0" from [email protected]
npm ERR!   node_modules/eslint-plugin-svelte
npm ERR!     dev eslint-plugin-svelte@"^2.35.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /Users/akashjoshi/.npm/_logs/2024-01-06T13_05_51_731Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/akashjoshi/.npm/_logs/2024-01-06T13_05_51_731Z-debug-0.log

System Info

System:
    OS: macOS 13.4.1
    CPU: (8) arm64 Apple M1
    Memory: 92.38 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.0 - /usr/local/bin/node
    npm: 9.6.7 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 115.1.56.14
    Safari: 16.5.2


### Severity

annoyance

### Additional Information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions