babel-loader@7.1.1需要webpack @ 2 ||的同行3但没有安装

时间:2017-07-20 13:01:26

标签: npm webpack babeljs babel-loader

做的时候

npm install babel-loader

我得到了

├── babel-loader@7.1.1 
└── UNMET PEER DEPENDENCY webpack@2 || 3

npm WARN babel-loader@7.1.1 requires a peer of webpack@2 || 3 but none was installed

如果我不能/不能,我该如何处理这个警告或者意味着什么?

版本:

$ webpack -v
3.3.0
$ node -v
v6.11.1

react@15.6.1

1 个答案:

答案 0 :(得分:2)

我能够做到这一点:

npm install webpack@3

然后,当我npm install babel-loader时,我会收到其他可选的依赖性警告,所以不确定是否可以。 大多数关于fsevents似乎与我的Ubuntu OS有关

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":"any"} (current {"os":"linux","arch":"x64"})