VUE项目启动: npm install --save core-js/modules/es.error.cause.js
VUE项目启动时出现如下错误信息:ERRORFailed to compile with 6 errors14:35:16This dependency was not found:* core-js/modules/es.error.cause.js in ./node_modules/_@babel_runtime@7.17.8@@babel/
·
VUE项目启动时出现如下错误信息:
ERROR Failed to compile with 6 errors 14:35:16
This dependency was not found:
* core-js/modules/es.error.cause.js in ./node_modules/_@babel_runtime@7.17.8@@babel/runtime/helpers/createForOfIteratorHelper.js, ./src/directive/permission/hasRole.js and 4 others
To install it, you can run: npm install --save core-js/modules/es.error.cause.js
解决方法:
- cmd进入前端vue项目的根目录
- 先删除
node_modules
依赖
cnpm rm -rf node_modules
- 首先安装
报错的插件
cnpm install --save core-js
- 后再
cnpm install
或者yarn install
cnpm install
yarn install
- 最后
npm run dev
运行启动
npm run dev
注:
本人安装了cnpm,使用cnpm 代替npm
npm install -g cnpm --registry=http://registry.npm.taobao.org
更多推荐
已为社区贡献1条内容
所有评论(0)