Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

993
Views
How do I resolve peer dependency conflicts with Nx, Angular and Nest?

I have a pretty fresh Nx workspace. Created an Angular app and a Nest app a few months ago, no problems. I come back after a hiatus to start a new Angular app and now I have a bunch of peer dependency conflicts I don't know how to resolve. I've tried adding the --legacy-peer-deps option to npm install and this works (4 high vulnerabilities) but when I try to run npx nx g @angular/material:ng-add I can't get around the errors.

Errors below:

npm ERR! While resolving: @nestjs/core@7.6.18
npm ERR! Found: @nestjs/common@8.4.6
npm ERR! node_modules/@nestjs/common
npm ERR!   @nestjs/common@"^8.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nestjs/common@"^7.0.0" from @nestjs/core@7.6.18
npm ERR! node_modules/@nestjs/core
npm ERR!   @nestjs/core@"^7.5.5" from the root project
npm ERR!   peer @nestjs/core@"^7.0.0" from @nestjs/platform-express@7.6.18
npm ERR!   node_modules/@nestjs/platform-express
npm ERR!     @nestjs/platform-express@"^7.5.5" from the root project
npm ERR!     2 more (@nestjs/core, @nestjs/testing)
npm ERR!   1 more (@nestjs/testing)
npm ERR!
npm ERR! Conflicting peer dependency: @nestjs/common@7.6.18
npm ERR! node_modules/@nestjs/common
npm ERR!   peer @nestjs/common@"^7.0.0" from @nestjs/core@7.6.18
npm ERR!   node_modules/@nestjs/core
npm ERR!     @nestjs/core@"^7.5.5" from the root project
npm ERR!     peer @nestjs/core@"^7.0.0" from @nestjs/platform-express@7.6.18
npm ERR!     node_modules/@nestjs/platform-express
npm ERR!       @nestjs/platform-express@"^7.5.5" from the root project
npm ERR!       2 more (@nestjs/core, @nestjs/testing)
npm ERR!     1 more (@nestjs/testing)
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.
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm not too sure how it ended up working out, but I just slowly dialed back my conflicting dependencies to previous versions until there were no dependency conflicts. This resulted in 8 high vulnerabilities, then I ran npm audit fix --force and it removed all vulnerabilities.

Just to make sure, I updated Nx (according to their docs) and now I don't have anymore issues or warnings or errors.

If someone knows why this resolved my issue, I would love to hear the explanation.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!