0

I am getting npm warnings when I am trying to install packages:

$ npm install
npm WARN @angular/compiler-cli@10.0.2 requires a peer of @angular/compiler@10.0.2 but none is installed. You must install peer dependencies yourself.

audited 1595 packages in 18.719s

58 packages are looking for funding
  run `npm fund` for details

found 294 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

In order to address the above peer issue warning, I tried installing that peer dependency and get the following warnings:

$ npm install @angular/compiler@10.0.2
npm WARN @angular/platform-browser-dynamic@8.2.14 requires a peer of @angular/compiler@8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN codelyzer@5.2.1 requires a peer of @angular/compiler@>=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0 but none is installed. You must install peer dependencies yourself.

+ @angular/compiler@10.0.2
added 1 package from 1 contributor, updated 1 package and audited 1596 packages in 15.701s

58 packages are looking for funding
  run `npm fund` for details

found 294 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

Can anyone help me with this?

aak
  • 107
  • 1
  • 4
  • 12
  • Does this answer your question? [How do I deal with installing peer dependencies in Angular CLI?](https://stackoverflow.com/questions/48626005/how-do-i-deal-with-installing-peer-dependencies-in-angular-cli) – R. Richards Jul 06 '20 at 19:43
  • Nope that doesn't help. As it keeps giving same error if I switch and install @angular/compiler@10.0.2 or 8.2.14 – aak Jul 06 '20 at 20:06

1 Answers1

0

Your package.json would not have @angular/compiler@10.0.2 Some libraries are dependent on others in the world of node packages like in this case @angular/compiler-cli@10.0.2 is dependent or uses some functionalities of @angular/compiler@10.0.2.

Just add @angular/compiler@10^ to your package.json and you will not get the warning next time you run npm install

Rupesh Chaudhari
  • 308
  • 2
  • 3
  • 12
  • it does have that in package.json: "devDependencies": { "@angular/compiler": "^10.0.2", "@angular/compiler-cli": "^10.0.2",} – aak Jul 06 '20 at 19:54