angular-material – 安装Angular Material时发出警告

前端之家收集整理的这篇文章主要介绍了angular-material – 安装Angular Material时发出警告前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我安装了Angular Material并在控制台上发现了几个警告.我有不兼容或缺少的库吗?
c:/...>npm install --save @angular/material @angular/cdk
npm WARN @angular/cdk@6.1.0 requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/cdk@6.1.0 requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/material@6.1.0 requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/material@6.1.0 requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @angular/cdk@6.1.0
+ @angular/material@6.1.0
added 2 packages in 42.598s
你在6.1.0中使用@ angular / material.此版本旨在与Angular 6一起使用.看起来您使用的是早期的Angular版本.

对于Angular 5,您可以通过更新package.json来使用版本5.x.x中的@ angular / material,如下所示:

"dependencies": {
    ...
    "@angular/cdk": "^5.2.5","@angular/material": "^5.2.5",...
 },
原文链接:https://www.f2er.com/angularjs/141229.html

猜你在找的Angularjs相关文章