gpt4 book ai didi

angular-material - 安装 Angular Material 时的警告

转载 作者:行者123 更新时间:2023-12-04 12:45:16 24 4
gpt4 key购买 nike

我安装了 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,您可以在 5.x.x 版本中使用 @angular/material 通过更新 package.json 如下:

"dependencies": {
...
"@angular/cdk": "^5.2.5",
"@angular/material": "^5.2.5",
...
},

关于angular-material - 安装 Angular Material 时的警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50496890/

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