近日使用react框架,结合dva脚手架搭建的项目,运行报错问题梳理

之前运行正常的项目,近日运行发现提示报错了

=原因是某些模块的版本更新了
目前为止碰到的错误情况有两种:
1:报错信息如下

./node_modules/_@material-ui_icons@1.1.0@@material-ui/icons/LocalCarWash.js
Module not found: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '...\node_modules\_@material-ui_icons@1.1.0@@material-ui\icons'

重新安装:重新安装@babel/[email protected] 就可以了
安装指令:

npm i @babel/runtime@7.0.0-beta.55 --save

2:报错信息如下:

ERROR in ./node_modules/recompose/dist/Recompose.esm.js Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/es6/extends'

解决办法:把roadhog 的版本是升级为:"^2.5.0-beta.4"
packge.json中的位置大致如此,可以选择把node_modules文件删除,修改如下两处,然后重新npm i 就可以了
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/baidu_41604826/article/details/88756611