webpack4 Cannot find module '@babel/core'
Posted laneyfu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了webpack4 Cannot find module '@babel/core'相关的知识,希望对你有一定的参考价值。
Error:
// webpack
Cannot find module ‘@babel/core‘
解决办法一:
原因"babel-loader": "^8.0.0" 版本问题。
使用"babel-loader": "^7.1.5"即可解决该错误。
package.json
"devDependencies":
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5"
解决办法二:
安装@babel/core依赖
https://www.npmjs.com/package/@babel/core
npm install --save-dev @babel/core
参考:https://blog.csdn.net/zSY_snake/article/details/88036785
https://www.cnblogs.com/jiebba/p/9618930.html
以上是关于webpack4 Cannot find module '@babel/core'的主要内容,如果未能解决你的问题,请参考以下文章
go 报错 cannot find module providing package或cannot find main module
eclipse故障cannot find -lstdc++,如何解决??麻烦高手详细讲解
/usr/bin/ld: cannot find -llzma /usr/bin/ld: cannot find -lbz2
Cannot find module '@babel/plugin-transform-react-jsx' 和Cannot find module '@babel/core&
Browser cannot find PAC because wpad hostname cannot be resolved