This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/_@babel_runtime
This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/_@babel_runtime
从git上下了一个后台框架,没node_modules,直接
cnpm install
然后
npm run dev
应该可以运行的,但是提示This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/_@babel_runtime,
方法一:
后来网上说先删除node_modules 中的core-js文件夹,然后重新安装高版本,我没解决
npm install --save core-js
方法二:
在项目文件夹里直接删除node_modules文件夹,然后在终端安装core-js
npm install --save core-js
然后
npm run dev
应该可以运行的,没解决
说是少了一些文件啥的(怀疑是网络问题,这一步应该可以解决的)
方法三:
在项目文件夹里直接删除node_modules文件夹,
从之前随便一个项目里复制粘贴了node_modules文件夹到本项目中,提示 Error: Cannot find module ‘@vue/cli-plugin-unit-jest’,然后
npm update
更新一下,重新运行下(因为反复安装啥的,可以强力清除下缓存 npm cache clean --force)
npm run dev
ok,解决。
中间出现了各种,说什么版本问题,还有什么直接安装@vue/cli-plugin-unit-jest之类的都无果,总结下其他代码:
//安装core-js
npm install --save core-js
//查看版本
npm -v
//安装最新版本
npm install -g npm
//npm安装
npm install
//运行dev
npm run dev
//强力清除缓存
npm cache clean --force
//安装@vue/cli-plugin-eslint
npm i @vue/cli-plugin-eslint
//安装低版本npm
cnpm install npm@6.13.4 -g
//npm更新包
npm update
参考:
1.【已解决】core-js/modules/es.error.cause.js 报错
2. 报错–解决core-js/modules/es.error.cause.js报错
更多推荐
所有评论(0)