0

I had several error messages for overriding peer dependencies when doing an npm install. After following the steps proposed by the accepted solution to this post. The most essential part being change the ~ versions to ^, remove node_modules and (if it exists) package-lock.json and run npm install again. I have now reduced the error message to the following :

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: console@0.0.0
npm ERR! Found: tslib@2.4.0
npm ERR! node_modules/tslib
npm ERR!   tslib@"^2.0.3" from the root project
npm ERR!   tslib@"^2.0.0" from @angular/cdk@10.2.7
npm ERR!   node_modules/@angular/cdk
npm ERR!     @angular/cdk@"^10.2.0" from the root project
npm ERR!     peer @angular/cdk@">=9.0.0" from mat-table-exporter@9.1.2
npm ERR!     node_modules/mat-table-exporter
npm ERR!       mat-table-exporter@"^9.0.2" from the root project
npm ERR!     1 more (@angular/material)
npm ERR!   6 more (@angular/common, @angular/core, @angular/material, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer tslib@"^1.10.0" from mat-table-exporter@9.1.2
npm ERR! node_modules/mat-table-exporter
npm ERR!   mat-table-exporter@"^9.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 /my/path/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /my/path/.npm/_logs/2022-07-21T15_27_07_820Z-debug-0.log

How do I solve this dependency issue? I cannot simply use --force or --legacy-peer-deps because my next step afterwards is moving from Angular 10 to 13. I tried doing the upgrade without fixing this issue and it forces @angular/cdk to remain at 10.x.x

TheArcticWalrus
  • 138
  • 3
  • 11
  • 1
    I guess mat-table-exporter is too old? Maybe there are newer versions available? – MikeOne Jul 21 '22 at 18:32
  • You are correct, the mat-table-exporter we had was for angular 9. I went to https://www.npmpeer.dev/packages/mat-table-exporter/compatibility and updated the version to the latest compatible version with angular 10. Thanks! – TheArcticWalrus Jul 22 '22 at 15:29

0 Answers0