在安装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"}) 

在进行npm安装时,我得到了上面提到的警告。 虽然这只是警告,并不会影响应用程序。 但是,我想知道是什么导致这些警告。

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

首先最后2个警告只是为那些正在使用非Mac的用户(即使我无法解决它们)

现在来谈谈其他警告。

你可以降级你的webpack版本或升级到最新版本。

他们是互相兼容的,因为我也是这样做的。

在我看来,升级所有的组件是解决这个问题的一个更好的方法。

这个模块在升级npm-check时会很有帮助