安装npm时收到警告

时间:2017-10-09 07:05:22

标签: node.js 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

1 个答案:

答案 0 :(得分:0)

  

首先,最后2个警告仅适用于正在使用的用户   除了mac。(即使我无法解决它们)

现在发出其他警告。

您可以降级webpack版本或将所有内容升级到最新版本。

它们彼此兼容,因为我也已经这样做了。

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

此模块在升级npm-check

时会很有帮助