当前位置:   article > 正文

Vue 解决npm安装插件时core-js报错

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文件中版本号)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/625000
推荐阅读
相关标签
  

闽ICP备14008679号