我在Ubuntu 16.04和18上都看到了这个问题。我试过重装yarn,重装node,甚至清除缓存,但都没有用,警告继续。我使用脚本来构建,因此每次构建完成后,node_module都会被删除,并从本地的package.json中重新安装。
下面附上package.json和警告。
package.json。
"dependencies": {
"@angular/animations": "^9.1.6",
"@angular/common": "^9.1.6",
"@angular/compiler": "^9.1.6",
"@angular/core": "^9.1.6",
"@angular/forms": "^9.1.6",
"@angular/localize": "^9.1.6",
"@angular/platform-browser": "^9.1.6",
"@angular/platform-browser-dynamic": "^9.1.6",
"@angular/router": "^9.1.6",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"jquery": "^3.3.1",
"ng-load": "^1.0.2",
"ng-multiselect-dropdown": "^0.2.6",
"ngx-mydatepicker": "^2.4.9",
"rxjs": "^6.5.5",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.901.6",
"@angular/cli": "9.1.6",
"@angular/compiler-cli": "^9.1.6",
"@angular/language-service": "^9.1.6",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^5.0.5",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^7.0.0",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~3.8.3"
}
WARNINGS:
warning @angular-devkitbuild-angular > less > [email protected]: request has been deprecated, see https:/github.comrequestrequestissues3142。
警告 @angular-devkitbuild-angular > webpack-dev-server > [email protected]: Chokidar 2将在节点v14+上崩溃。升级到chokidar 3,减少15倍的依赖性。
warning @angular-devkitbuild-angular > webpack-dev-server > chokidar > [email protected]: fsevents 1 会在 v14+ 节点上崩溃,可能使用了不安全的二进制文件。升级到fsevents 2。
warning @angular-devkitbuild-angular > webpack > watchpack > [email protected]: Chokidar 2 将在节点 v14+ 上崩溃。升级到chokidar 3,减少15倍的依赖性。
warning @angular-devkitbuild-angular > stylus > css-parse > css > [email protected]: 请看 https:/github.comlydellurix#deprecated。
警告 @angular-devkitbuild-angular > stylus > css-parse > css > source-map-resolve > [email protected]: 请看 https:/github.comlydellurix#deprecated。
warning @angular-devkitbuild-angular > stylus > css-parse > css > source-map-resolve > [email protected]: https:/github.comlydellresolve-url#deprecated。
warning @angularcli > universal-analytics > [email protected]: 请求已被废弃,请参见 https:/github.comrequestrequestissues3142。
warning karma-coverage-istanbul-reporter > istanbul-api > istanbul-lib-instrument > babel-generator > babel-runtime > [email protected]: core-js@<3已经不再维护,由于问题较多,不建议使用。请将您的依赖关系升级到core-js@3的实际版本。
警告 protractor > webdriver-manager > [email protected]: 请求已被废弃,请参见 https:/github.comrequestrequestissues3142。
警告并不重要。你应该等待Angular团队来解决这个问题.但是。karma-coverage-istanbul-reporter
应安装在版本为~2.1的地方。