Vue 解决npm安装插件时core-js报错
Vue npm报错core-js版本过高
一、报错信息
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/element-ui/-/element-ui-2.15.14.tgz failed, reason: connect ETIMEDOUT 104.16.25.34:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
二、报错原因
core-js版本不一致
三、解决方法
1、首先看package.json文件中core-js版本是否与package-lock.json文件中core-js版本一致
2、npm uninstall core-js 删除原本core-js
3、npm install core-js@3.8.3 --save 安装新版本(package-lock.json文件中版本号)
更多推荐
所有评论(0)