首页 前端知识 Vue 解决npm安装插件时core-js报错

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

2024-06-16 09:06:40 前端知识 前端哥 423 615 我要收藏

一、报错信息

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

转载请注明出处或者链接地址:https://www.qianduange.cn//article/12355.html
标签
评论
发布的文章

JQuery中的load()、$

2024-05-10 08:05:15

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!