安装Angular Materials时收到以下警告
npm WARN @angular/cdk@5.2.4 requires a peer of @angular/core@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/cdk@5.2.4 requires a peer of @angular/common@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/material@5.2.4 requires a peer of @angular/core@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/material@5.2.4 requires a peer of @angular/common@^5.0.0 but none is installed. You must install peer dependencies yourself.
现在当我检查我的Angular版本(ng --version)时,我看到了:
Angular CLI: 6.0.0-rc.3
Node: 9.11.1
OS: win32 x64
Angular: 6.0.0-rc.3
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cdk: 5.2.4
@angular/material: 5.2.4
@angular-devkit/architect: 0.5.5
@angular-devkit/build-angular: 0.5.5
@angular-devkit/build-optimizer: 0.5.5
@angular-devkit/core: 0.5.5
@angular-devkit/schematics: 0.5.5
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 6.0.0-rc.3
@schematics/angular: 0.5.5
@schematics/update: 0.5.5
typescript: 2.7.2
webpack: 4.5.0
所以我比Angular Materials的5.0要求更高。 我错过了什么?
我的目标是创建一个在我的VS2017项目中运行的应用程序。
答案 0 :(得分:0)
我能够通过使用纱线代替npm来解决这个问题。它似乎将依赖关系保持在一起比npm更好。因此,在尝试更新Angular时,不那么痛苦。