core-js引起的报错

从git上获取的代码突然运行不起来,报错提示含有

deprecated core-js@3.8.1: 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.

翻译过来就是

不赞成core-js@3.8.1:core js@ < 3.23.3不再维护,由于问题数量众多,不建议使用。由于V8引擎的奇思妙想,即使没有填充任何内容,旧的core-js版本中的功能检测也可能导致速度减慢100倍。某些版本存在web兼容性问题。请将您的依赖项升级到core-js的实际版本。

检查了一下当前的core-js版本确实是3.8.1。但是在其他同事项目上运行确实是没问题的,最终决定更新到最新的core-js插件版本。

npm i core-js

显示更新到最新版本

在运行项目就没问题了

posted @ 2023-12-22 09:18  seekHelp  阅读(234)  评论(0编辑  收藏  举报