纱线启动命令导致模块未找到错误

时间:2019-07-18 11:06:37

标签: reactjs yarnpkg

运行yarn start命令时出现此错误:

Module not found: Can't resolve 

'@babel/runtime/helpers/builtin/assertThisInitialized' in 
'/home/new88/Desktop/javascript/the_venue/node_modules/@material-ui/core/ButtonBase'

在浏览器中输出

编译失败

./node_modules/@material-ui/core/ButtonBase/TouchRipple.js
Module not found: Can't resolve 
'@babel/runtime/helpers/builtin/assertThisInitialized' in 
'/home/new88/Desktop/javascript/the_venue/node_modules/@material-ui/core/ButtonBase'

请帮助我,我被卡住了。预先感谢。

1 个答案:

答案 0 :(得分:1)

从github引用comment-

The issue seems from the Babel runtime being split into two,
and breaking the Material UI.

I downgraded the babel runtime, with 
npm install --save-exact @babel/runtime@7.0.0-beta.55
and it works now.