简体   繁体   English

安装npm时收到警告

[英]Getting warnings while installing npm

npm WARN extract-text-webpack-plugin@1.0.1 requires a peer of webpack@^1.9.11 but none is installed. You must install peer dependencies yourself.
npm WARN karma-webpack@1.7.0 requires a peer of webpack@^1.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native@0.49.2 requires a peer of react@16.0.0-beta.5 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@3.2.0 requires a peer of webpack@^1.12.6 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@1.12.0 requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@2.0.0-beta requires a peer of webpack@>=2.0.3-beta <3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

I'm getting above mentioned warnings while doing npm install. 我在进行npm安装时遇到上述警告。 Although, these are just warnings and are not gonna impact application. 虽然,这些只是警告,不会影响应用程序。 But, I want to know what is leading to these warnings. 但是,我想知道导致这些警告的原因。

I am using npm `version 5.4.2`
node version is 6.11.4 
webpack 2.1.0-beta.22

first of all last 2 warnings are just for those user who are using other than mac.(Even I wasn't able to resolve them) 首先,最后2条警告仅针对那些使用mac以外的用户(即使我也无法解决它们)

Now coming to other warnings. 现在出现其他警告。

you can either downgrade your webpack version or upgrade everything to latest versions. 您可以降级webpack版本或将所有内容升级到最新版本。

They are compatible with each other as I have also done that. 它们彼此兼容,因为我也做到了。

In my opinion upgrading all your components is a better way to solve this. 我认为升级所有组件是解决此问题的更好方法。

This module will be helpful while upgrading it npm-check 该模块在升级npm-check时将很有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM