如何修复 npm UNMET PEER DEPENDENCY 警告? [英] How do I fix the npm UNMET PEER DEPENDENCY warning?
问题描述
我使用的是 Windows 10,使用 Node 5.6.0 和 npm 3.6.0.我正在尝试将 angular-material 和 mdi 安装到我的工作文件夹中.npm install angular-material mdi 错误:
I'm on Windows 10, with Node 5.6.0 and npm 3.6.0. I'm trying to install angular-material and mdi into my working folder. npm install angular-material mdi errors with:
+-- angular@1.5.0
+-- UNMET PEER DEPENDENCY angular-animate@^1.5.0
+-- UNMET PEER DEPENDENCY angular-aria@^1.5.0
+-- angular-material@1.0.6
+-- UNMET PEER DEPENDENCY angular-messages@^1.5.0 `-- mdi@1.4.57
npm WARN enoent ENOENT: no such file or directory, open
'C:\Users\xxxxx\Desktop\ngClassifieds\package.json'
npm WARN angular-material@1.0.6 requires a peer of
angular-animate@^1.5.0 but none was installed.
npm WARN angular-material@1.0.6 requires a peer of angular-aria@^1.5.0
but none was installed.
npm WARN angular-material@1.0.6 requires a peer of
angular-messages@^1.5.0 but none was installed.
如何解决此问题以安装 AngularJS Material 和 MDI?
How do I resolve this to get AngularJS Material and MDI installed?
推荐答案
npm 不再安装对等依赖项,因此您需要手动安装它们,只需在需要的 deps 上执行 npm install
,然后再次尝试安装主要的.
npm no longer installs peer dependencies so you need to install them manually, just do an npm install
on the needed deps, and then try to install the main one again.
回复评论:
就在该消息中,它说明您缺少哪些依赖
it's right in that message, it says which deps you're missing
UNMET PEER DEPENDENCY angular-animate@^1.5.0 +--
UNMET PEER DEPENDENCY angular-aria@^1.5.0 +-- angular-material@1.0.6 +
UNMET PEER DEPENDENCY angular-messages@^1.5.0 `-- mdi@1.4.57`
所以你需要npm install angular angular-animate angular-aria angular-material angular-messages mdi
这篇关于如何修复 npm UNMET PEER DEPENDENCY 警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!