我有一个有角度的项目,由纱线PM管理:
>ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 7.0.3
Node: 10.13.0
OS: win32 x64
Angular: 7.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.7.5
@angular-devkit/build-optimizer 0.7.5
@angular-devkit/build-webpack 0.7.5
@angular-devkit/core 7.0.3
@angular-devkit/schematics 7.0.3
@angular/cdk 6.4.7
@angular/cli 7.0.3
@angular/material 6.4.7
@ngtools/webpack 6.1.5
@schematics/angular 7.0.3
@schematics/update 0.10.3
rxjs 6.3.3
typescript 3.1.4
webpack 4.9.2
如果yarn通知我有关不正确的同级依赖关系,我该怎么办? 我知道那不会阻止我的(角度)项目的建立,但是我不喜欢解决方案中的警告...我该怎么做才能解决它?
C:\myproject>yarn upgrade
yarn upgrade v1.9.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/1040(node:22268) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @angular/cdk@6.4.7" has incorrect peer dependency "@angular/core@>=6.0.0-beta.0 <7.0.0".
warning " > @angular/cdk@6.4.7" has incorrect peer dependency "@angular/common@>=6.0.0-beta.0 <7.0.0".
warning " > @angular/material@6.4.7" has incorrect peer dependency "@angular/core@>=6.0.0-beta.0 <7.0.0".
warning " > @angular/material@6.4.7" has incorrect peer dependency "@angular/common@>=6.0.0-beta.0 <7.0.0".
warning " > angular2-csv@0.2.9" has incorrect peer dependency "@angular/common@^6.0.0-rc.0 || ^6.0.0".
warning " > angular2-csv@0.2.9" has incorrect peer dependency "@angular/core@^6.0.0-rc.0 || ^6.0.0".
warning "@angular-devkit/build-angular > @ngtools/webpack@6.1.5" has incorrect peer dependency "typescript@~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0 || ~2.8.0 || ~2.9.0".
warning " > codelyzer@4.2.1" has incorrect peer dependency "@angular/compiler@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0".
warning " > codelyzer@4.2.1" has incorrect peer dependency "@angular/core@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0".
warning " > codelyzer@4.2.1" has incorrect peer dependency "@angular/platform-browser-dynamic@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0".
warning " > codelyzer@4.2.1" has incorrect peer dependency "@angular/platform-browser@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0".
warning " > codelyzer@4.2.1" has incorrect peer dependency "@angular/common@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0".
...
我的package.json文件在下面
{
"name": "client-app",
"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.0.1",
"@angular/cdk": "^6.4.7",
"@angular/common": "^7.0.1",
"@angular/compiler": "^7.0.1",
"@angular/core": "^7.0.1",
"@angular/forms": "^7.0.1",
"@angular/http": "^7.0.1",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "^7.0.1",
"@angular/platform-browser-dynamic": "^7.0.1",
"@angular/router": "^7.0.1",
"angular2-csv": "^0.2.9",
"core-js": "^2.5.4",
"fast-deep-equal": "^2.0.1",
"rxjs": "^6.3.2",
"rxjs-compat": "^6.3.2",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.7.0",
"@angular/cli": "~7.0.3",
"@angular/compiler-cli": "^7.0.1",
"@angular/language-service": "^7.0.1",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~3.1.4"
}
}
答案 0 :(得分:1)
angular5-csv
库已经有7个月没有更新(npmjs)了,如果要摆脱警告,应该从依赖项中删除angular5-csv
并使用更多更新了库,或者没有库则以其他方式实现。