`npm install` dependency resolution issue
Closed this issue · 3 comments
When trying to npm install
to demo this cool project, I'm receiving a dependecy error:
(base) :~/Documents/justship$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: justshipgit@0.0.1
npm ERR! Found: svelte@5.0.0-next.54
npm ERR! node_modules/svelte
npm ERR! dev svelte@"^5.0.0-next.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer svelte@"^4.0.0" from bits-ui@0.17.0
npm ERR! node_modules/bits-ui
npm ERR! bits-ui@"^0.17.0" 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.
Using --force
gives a bunch of additional warnings about dependency resolution.
This is on node 18.17.0, for what it's worth.
Svelte5 hasn't been officially released yet. So a couple of packages don't support it officially yet even though it seems to work fine. I didn't want to use svelte 4 because svelte 5 is close to release but I'll put a big warning for now that svelte 5 is still in alpha
Thank you - the bigger issue for me is still that cloning the file and running npm install
doesn't actually work... --force-legacy-deps
helps though.
Yes the way to fix that would be to downgrade to svelte 4. But I personally would rather start new projects with svelte 5 already and wait for the dependencies to get updated so I'm keeping it as is for now.