nilsmehlhorn/ngrx-wieder

Can't install version 3.1.x with angular 9.1.x and npm 7.x

Menecats opened this issue · 5 comments

Hi, while trying to install the library (version 3.1.1) into an angular 9.1.x application I'm getting this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: perf-ui@3.10.0-next.6
npm ERR! Found: @angular/common@9.1.13
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"9.1.13" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^8.0.1 - ^9.0.7" from ngrx-wieder@3.1.1
npm ERR! node_modules/ngrx-wieder
npm ERR!   ngrx-wieder@"3.1.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! See /home/menecats/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/menecats/.npm/_logs/2021-08-25T10_47_23_851Z-debug.log

This error only appears in npm 7.x (currently i'm using 7.21.0) as they've changed the peer dependency management strategy.
I've installed the library with the --legacy-peer-deps and it works as intended.
Can you please update the peer dependency for @angular/common to support also angular 9.1 directly with npm 7?

Thanks

I guess the peer dependency version ^8.0.1 - ^9.0.7 in 3.1.1 was illegal. It should've ben ^8.0.1 || ^9.0.7.

"@angular/common": "^8.0.1 - ^9.0.7",

Are you sure you wouldn't rather update your Angular version and use a newer version of ngrx-wieder?

That's something that's in my road-map, but unfortunately currently I'm locked with 9.x due to rather big breaking changes in other libraries that I'm using.

And where's the problem with --legacy-peer-deps? Can't you use that, if you're not willing to update?

That's not a problem, is just an inconvenience, mainly i'd like to avoid updating the automation scripts and teach all the other person in the team that now they have to add the flag during install.

If for you version 3.x is "unmaintained" that's not a problem, i was only asking if it's possible to update the package.json

In that case, it's unmaintaned. You may fork though or keep a local copy of the library.