无法从webpack 3升级到3.12.0

时间:2018-06-10 18:33:13

标签: npm webpack npm-install

我尝试使用的节点包需要比我安装的更高版本的webpack。

我的packages.json文件是here

当我尝试安装时:

npm install webpack@3.12.0

我收到以下错误:

$ npm install webpack@3.12.0
app@1.0.0 /home/ubuntu/workspace
└── UNMET PEER DEPENDENCY webpack@3.12.0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2     (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for     fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current:     {"os":"linux","arch":"x64"})
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.2.4: wanted {"os":"darwin","arch":"any"} (current:     {"os":"linux","arch":"x64"})
npm WARN eonasdan-bootstrap-datetimepicker@4.17.47 requires a peer of     bootstrap@^3.3 but none was installed.
npm WARN extract-text-webpack-plugin@2.1.2 requires a peer of     webpack@^2.2.0 but none was installed.
npm ERR! code 1

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,但是按照Vu Huu Cuong所说的指示解决了该问题:

rm -rf node_modules/
npm cache clean
npm install