简体   繁体   中英

Npm Angular Warning while installing packages

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM