简体   繁体   English

使用 NPM 安装软件包时如何清除角度警告消息

[英]How to clear angular warning messages while installing packages using NPM

I need to remove below warning message of Angular while I am installing the packages.我需要在安装软件包时删除以下 Angular 警告消息。

npm WARN @auth0/angular-jwt@5.0.2 requires a peer of @angular/common@>=9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-notifications@9.0.0 requires a peer of @angular/animations@^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-notifications@9.0.0 requires a peer of @angular/common@^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-notifications@9.0.0 requires a peer of @angular/core@^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-notifications@9.0.0 requires a peer of @angular/platform-browser@^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-notifications@9.0.0 requires a peer of @angular/platform-browser-dynamic@^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-notifications@9.0.0 requires a peer of rxjs@^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-notifications@9.0.0 requires a peer of zone.js@^0.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-file-drop@5.0.2 requires a peer of @angular/common@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-file-drop@5.0.2 requires a peer of @angular/core@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-file-drop@5.0.2 requires a peer of @angular/platform-browser@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-file-drop@5.0.2 requires a peer of rxjs@^5.5.2 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-mat-select-search@3.3.0 requires a peer of @angular/material@^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 but none is installed. You must install peer dependencies yourself.

These are the warning messages coming while installing the packages using npm .这些是使用npm安装软件包时出现的警告消息。 My package.json file is given below.我的package.json文件如下。

package.json:包.json:

{
  "name": "demo",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^7.2.16",
    "@angular/cdk": "^7.2.0",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/http": "^7.2.16",
    "@angular/material": "^7.2.0",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/router": "~7.2.0",
    "@auth0/angular-jwt": "^5.0.1",
    "@fortawesome/free-regular-svg-icons": "^5.12.1",
    "ag-grid": "^18.1.2",
    "ag-grid-angular": "^22.1.1",
    "ag-grid-community": "^22.1.1",
    "angular-font-awesome": "^3.1.2",
    "angular-popper": "^2.0.1",
    "angular2-notifications": "^9.0.0",
    "bootstrap": "^4.5.2",
    "bootstrap.min.js": "^3.3.5",
    "core-js": "^2.5.4",
    "file-saver": "^2.0.2",
    "font-awesome": "^4.7.0",
    "jquery": "^3.4.1",
    "jwt-decode": "^2.2.0",
    "lodash": "^4.17.15",
    "ngx-mat-select-search": "^3.3.0",
    "ngx-monaco-editor": "^6.0.0",
    "ngx-spinner": "^7.2.0",
    "popper.js": "^1.16.1",
    "rxjs": "~6.3.3",
    "tslib": "^1.9.0",
    "zlib": "^1.0.5",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.13.9",
    "@angular/cli": "~7.3.3",
    "@angular/compiler-cli": "~7.2.0",
    "@angular/language-service": "~7.2.0",
    "@cisco-ngx/cui-components": "^7.14.22",
    "@cisco-ngx/cui-pipes": "^7.14.22",
    "@cisco-ngx/cui-services": "^7.14.22",
    "@cisco-ngx/cui-utils": "^7.14.22",
    "@types/file-saver": "^2.0.1",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/jquery": "^3.3.33",
    "@types/node": "~8.9.4",
    "cisco-ui": "^1.3.3",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "luxon": "^1.25.0",
    "ng-file-drop": "^5.0.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslerp2": "^2.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.2.2"
  }
}

Here I want to clear all the warning messages.这里我想清除所有警告信息。 Can anybody suggest me what should be the correct approach to resolve this problem ?任何人都可以建议我解决这个问题的正确方法是什么?

npm no longer installs peer dependencies automatically. npm 不再自动安装对等依赖项。 So you need to do that by yourself, installing each dependency separately:所以你需要自己做,分别安装每个依赖项:

npm install --save-dev <dependency-name>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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