0

I am setting up a new laptop. I have installed node.js application and trying to build my Angular project which works fine on the old laptop. Here are the errors:

pm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: aveva-web-analytics@0.0.0
npm ERR! Found: @angular/cdk@11.2.13
npm ERR! node_modules/@angular/cdk
npm ERR!   @angular/cdk@"^11.2.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/cdk@"^10.0.0-rc.0" from @angular/flex-layout@10.0.0-beta.32
npm ERR! node_modules/@angular/flex-layout
npm ERR!   @angular/flex-layout@"^10.0.0-beta.32" 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.

what confuses me is how come it works on the other box?

Thanks

Mark
  • 4,535
  • 7
  • 39
  • 76

2 Answers2

0

@angular/flex-layout asks for Angular 10, when your own dependencies has Angular 11.

You will need to update @angular/flex-layout to a newer version (likely 11.0.0-beta.33).

Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
0

Just update @angular/flex-layout to the latest version by using these command

ng update @angular/flex-layout