错误:Module build failed: Error: 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依赖
yarn add -D @babel/core
网友评论