未满足的对等依赖webpack@3.6.0

时间:2017-09-19 19:38:19

标签: npm webpack webpack-dev-server npm-install sass-loader

我正在尝试在项目上运行npm install,但无法解析webpack包。我已经跟踪了谷歌和此处发现的大多数其他问题答案。

我已经完全清理了nodejs + npm文件的计算机,再次通过以下答案: How to completely remove node.js from Windows Unmet Peer Dependency angular 2.3.0 rxjs zone.js

我试图在全局范围内手动安装未满足的依赖项,并使用npm install --save将其持久保存到package.json。安装它要求的特定版本,然后安装最新版本。

我遇到的错误是:     UNMET PEER DEPENDENCY webpack@3.6.0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 
(node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@1.1.2: wanted {"os":"darwin","arch":"a
ny"} (current: {"os":"win32","arch":"x64"})
npm WARN sass-loader@4.1.1 requires a peer of webpack@^2 || ^2.2.0-rc.0 || 
^2.1.0-beta || ^1.12.6 but none was install
ed.
PS C:\Users\david.maceachern\Projects\ia_beta\impacttool\src\ui> npm install 
--save webpack
angular-phonecat@0.0.0 
C:\Users\david.maceachern\Projects\ia_beta\impacttool\src\ui
`-- UNMET PEER DEPENDENCY webpack@3.6.0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 
(node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@1.1.2: wanted {"os":"darwin","arch":"a
ny"} (current: {"os":"win32","arch":"x64"})
npm WARN sass-loader@4.1.1 requires a peer of webpack@^2 || ^2.2.0-rc.0 || 
^2.1.0-beta || ^1.12.6 but none was install
ed.
npm ERR! code 1

1 个答案:

答案 0 :(得分:5)

我通过阅读有关对等依赖项https://nodejs.org/en/blog/npm/peer-dependencies/解决了这个问题,并继续清理我的package.json修复版本,以便npm install不会安装具有重大更改的版本。

我通过检查npm错误中出现的软件包github上的发行说明来确定正确的版本。