Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
akash-joshi opened this issue Jan 6, 2024 · 3 comments · Fixed by #11627
Closed

Comments

@akash-joshi
Copy link

akash-joshi commented Jan 6, 2024

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_
@ghostdevv
Copy link
Member

If you bump to [email protected] it will fix that warning as it has experimental svelte 5 support.

Not sure if we wanna set that as the default in the create-svelte template or not

@benmccann
Copy link
Member

We can use the -next version for users who select Svelte 5 and keep the stable version for users on Svelte 4

@zyrain
Copy link

zyrain commented Jan 24, 2024

Doing this is still showing the vite unmet peer warning:

└─┬ @sveltejs/vite-plugin-svelte 3.0.1
└─┬ svelte-hmr 0.15.3
└── ✕ unmet peer svelte@"^3.19.0 || ^4.0.0": found 5.0.0-next.38

Can that be safely ignored?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants