在配置webpack过程中,配置babel解决浏览器兼容性问题时,出现如下问题:

babel配置报错:Requires Babel 7.0.0-0, but was loaded with 6.26.3.

问题原因:安装的babel-loader和babel-core版本不匹配。

解决方法:首先打开package.json文件,删除如下图中的标记,

babel配置报错:Requires Babel 7.0.0-0, but was loaded with 6.26.3.

然后重新安装:npm install babel-loader,最后再执行即可成功,这是最简单的解决方法。

 

 

 

相关文章:

  • 2022-01-11
  • 2021-11-29
  • 2021-07-02
  • 2021-11-16
  • 2021-09-05
  • 2021-07-16
  • 2021-07-05
  • 2022-01-11
猜你喜欢
  • 2021-07-11
  • 2021-11-17
  • 2021-04-04
  • 2021-12-26
  • 2022-12-23
  • 2021-08-31
相关资源
相似解决方案