ngx-slider icon indicating copy to clipboard operation
ngx-slider copied to clipboard

angular 17.3.5 => ERESOLVE could not resolve

Open StanAmaris opened this issue 2 years ago • 1 comments

While installing the lib on an angular 17.3.5, i get an error that it cannot resolve some dependencies, it is looking for 17.1.1 and not 17.3.5 or over. I need to install the lib with --force, which causes problemes with my deployment pipeline. Would it be possible to update de thependencies to allow those in my error message or later ?

Thank you. (PS: Thanks for that lib, the slider is very cool and customizable, it is always my go to when in need of a slider :D )

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @angular-slider/[email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/common npm ERR! @angular/common@"^17.0.0" from the root project npm ERR! peer @angular/common@"^17.0.0" from @amaris/[email protected] npm ERR! node_modules/@amaris/lib-highway npm ERR! @amaris/lib-highway@"^0.1.23" from the root project npm ERR! 9 more (@angular/cdk, @angular/platform-browser, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"^17.1.1" from @angular-slider/[email protected] npm ERR! node_modules/@angular-slider/ngx-slider npm ERR! @angular-slider/ngx-slider@"^17.0.2" from the root project npm ERR! npm ERR! Conflicting peer dependency: @angular/[email protected] npm ERR! node_modules/@angular/common npm ERR! peer @angular/common@"^17.1.1" from @angular-slider/[email protected] npm ERR! node_modules/@angular-slider/ngx-slider npm ERR! @angular-slider/ngx-slider@"^17.0.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.

StanAmaris avatar Apr 19 '24 13:04 StanAmaris

Try deleting the node_modules and package-lock.json and then npm install

The lib peerDeps is "^17.1.1" so it should work with angular 17.3.5.

danisss9 avatar Apr 23 '24 17:04 danisss9

I confirmed that the slider is working in a fresh Angular project created for Angular = 17.3.5. As explained above, this issue is caused by corrupted package-lock.json or node_modules/, not any dependency setting of ngx-slider.

piotrdz avatar Jun 24 '24 06:06 piotrdz