npm实践报错处理:core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended

一、core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended

  之前的电脑 node 是 14 版本,对应 npm 是 6 版本,项目都是正常启动的。但是新换了个笔记本,新装 node 环境,node 是最新的 16 版本,对应 npm 是 8 版本。有个项目 npm install 报错如下:

core-js@2.6.12: core-js@<3.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. Please, upgrade your dependencies to the actual version of core-js.
由于问题太多,不再维护3.3,也不推荐使用。由于V8引擎的怪想,旧core-js版本的特性检测可能会导致速度下降100倍,即使没有填充。请将你的依赖升级到core-js的实际版本。

  网上找了一些解决方法,有说是因为切到淘宝镜像源的原因,需要切回 npm 官方源。我切回之后,安装太慢,故放弃。

  后来发现是自己的npm版本太高了,是8.x.x,建议退回 6 版本,成功解决!

npm install npm@6.14.14  -g

 

posted @ 2018-03-26 19:14  古兰精  阅读(5759)  评论(0编辑  收藏  举报