svelte-confetti icon indicating copy to clipboard operation
svelte-confetti copied to clipboard

The published version of this package on npm has a peer dep on svelte v5 which is not released.

Open oliverabrahams opened this issue 1 year ago • 6 comments

When installing version https://www.npmjs.com/package/svelte-confetti v2.1.1  PNPM gives this error ->

ERR_PNPM_NO_MATCHING_VERSION  No matching version found for svelte@>=5.0.0 <6.0.0

The package json version on main is "version": "1.4.0" but on npm there is a v2.1.1

oliverabrahams avatar Aug 08 '24 14:08 oliverabrahams

The issue is this line: https://github.com/Mitcheljager/svelte-confetti/blob/8677b2ac60b36a138921d8488545d52460ece214/package.json#L28

I was able to fix it by using --legacy-peer-deps in npm. Maybe that works for pnpm as well.

soerenmeier avatar Aug 15 '24 20:08 soerenmeier

If you are using Svelte 4, use version 1.x.x. Version 2.x.x is reserved for Svelte 5.

Mitcheljager avatar Aug 15 '24 20:08 Mitcheljager

I might have used the wrong version, using ^5.0.0 instead of >=5.0.0. Not entirely sure, but let me know if this still happens with the Svelte 5 branch

Mitcheljager avatar Aug 15 '24 21:08 Mitcheljager

@Mitcheljager Still happening

npm install svelte-confetti@latest npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/svelte npm ERR! dev svelte@"^5.0.0-next.223" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer svelte@">=5.0.0" from [email protected] npm ERR! node_modules/svelte-confetti npm ERR! svelte-confetti@"2.1.2" 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.

peterolson avatar Aug 17 '24 02:08 peterolson

Same here ☝️

rikardkling avatar Aug 27 '24 07:08 rikardkling

@Mitcheljager I think you might need to change the svelte peerDependencies to ^5.0.0-next.190 or a next release version currently it is 259 see svelte releases as this is what Astro's svelte package does

bigandy avatar Sep 25 '24 09:09 bigandy

This should now be good with the Svelte 5 release

Mitcheljager avatar Dec 08 '24 19:12 Mitcheljager