gpt4 book ai didi

node.js - NPM 对等依赖

转载 作者:太空狗 更新时间:2023-10-29 17:56:50 25 4
gpt4 key购买 nike

我目前正在从 Angular 4 升级到 Angular 5,之后收到了一些警告,例如:

npm WARN @angular/compiler-cli@5.0.1 requires a peer of typescript@>=2.4.2 <2.5 but none is installed. You must install peer dependencies yourself.
npm WARN @covalent/core@1.0.0-beta.8-1 requires a peer of @angular/common@^4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN @covalent/core@1.0.0-beta.8-1 requires a peer of @angular/core@^4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN @covalent/core@1.0.0-beta.8-1 requires a peer of @angular/forms@^4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN @covalent/core@1.0.0-beta.8-1 requires a peer of @angular/http@^4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN @covalent/core@1.0.0-beta.8-1 requires a peer of @angular/router@^4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN @covalent/core@1.0.0-beta.8-1 requires a peer of @angular/cdk@^2.0.0-beta.12 but none is installed. You must install peer dependencies yourself.
npm WARN @covalent/core@1.0.0-beta.8-1 requires a peer of @angular/material@^2.0.0-beta.12 but none is installed. You must install peer dependencies yourself.

这是我的 package.json

{
"name": "myAngularProject",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/cdk": "^5.0.0-rc0",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/material": "^5.0.0-rc0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"@covalent/core": "^1.0.0-beta.8-1",
"@ng-dynamic-forms/core": "^1.4.34",
"@ng-dynamic-forms/ui-material": "^1.4.34",
"ag-grid": "^13.3.1",
"ag-grid-angular": "^13.3.0",
"angular-in-memory-web-api": "^0.3.2",
"core-js": "^2.5.1",
"ng2-dnd": "^4.2.0",
"rxjs": "^5.5.2",
"webpack": "^3.8.1",
"zone.js": "^0.8.18"
},
"devDependencies": {
"@angular/cli": "^1.5.0",
"@angular/compiler-cli": "^5.0.0",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.90",
"codelyzer": "~2.0.0",
"install-peers": "^1.0.2",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "^2.3.4"
},
}

我现在的问题是,如何手动添加这些对等依赖项以及添加到何处?我已经搜索了自动添加它们的方法,但它们不起作用。

最佳答案

注意:

您不必自己添加任何对等依赖项。该消息仅显示您有未满足的依赖项,我相信您可以继续使用 @covalent 包,除非出现某些问题,因为这些是警告。

这似乎是 @covalent 包的问题,​​因为它依赖于 @angular4 并且它是各自的包并且似乎不兼容。由于 angular4 和 angular5 几乎没有重大变化。所以这是预期的行为。您现在恰好有两个选择:

  1. 向上述 repository 提交 PR ,这样您就可以尽快得到修复。
  2. 等待@covalent 为@angular5 发布更新,一旦更新结束,您就可以安全地更新@angular4 本身和@covalent 也是。

关于node.js - NPM 对等依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47198036/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com