如下所示,新手安装若依RuoYi-Cloud框架前端vue时会报如下错误:
ERROR Failed to compile with 7 errors
This dependency was not found:
- core-js/modules/es.error.cause.js in ./node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js, ./src/directive/permission/hasRole.js and 5 others
To install it, you can run: npm install --save core-js/modules/es.error.cause.js
如何解决,直接上方法:
1.删除node_modules目录
2.安装报错的插件 npm install --save core-js
3.yarn 或者 npm i
npm run dev 重新运行看效果,方法看似不高明,但亲测有效,很能解决问题。。