nilsmehlhorn/ngrx-wieder

6.0.2 version dependency on Angular 11

digoburigo opened this issue · 3 comments

When I try to install the 6.0.2 version this error occurs when intalling the dependecies

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: vm2-coleta@0.0.0
npm ERR! Found: @angular/common@12.1.2
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"~12.1.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^11.0.0" from ngrx-wieder@6.0.2
npm ERR! node_modules/ngrx-wieder
npm ERR!   ngrx-wieder@"6.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.
npm ERR! 
npm ERR! See /home/digob/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/digob/.npm/_logs/2021-07-15T20_03_14_190Z-debug.log```

Huh, seems like you're using ngrx-wieder in an Angular 12 project. The library is still on Angular 11. Usually, that'd only end up in a warning but it seems that since npm v7 this fails the installation completely.

You can try the fix proposed in the error, specifically using the --force or --legacy-peer-deps when installing. I don't know whether 6.0.2 is compatible with Angular 12, so proceed with caution. Otherwise you'd need to wait until the library is updated to Angular 12 (on that note, you're welcome to provide a PR for that).

I updated all the packages, run the tests and it worked. I just removed this lib import 'core-js/es7/reflect' from the test.ts to work properly.

Thanks, I'll look into it this weekend!