当前位置:   article > 正文

package-lock.json引用了淘宝镜像,但是淘宝镜像地址变更了_package-lock.json 镜像源修改

package-lock.json 镜像源修改

今天项目重新clone了下来,npm i 安装后,会报错:

gine 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 WARN deprecated core-js-pure@3.14.0: core-js-pure@<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-pure.
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz failed, reason: certificate has expired

npm ERR! A complete log of this run can be found in: C:\Users\wuyan\AppData\Local\npm-cache\_logs\2024-02-27T07_43_58_703Z-debug-0.log
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

npm ERR! request to https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz failed, reason: certificate has expired

定位半天发现,淘宝镜像的地址变了:https://npmmirror.com/在这里插入图片描述

如何解决呢?

手动修改 package-lock.json

打开 package-lock.json 文件。
使用文本编辑器的查找和替换功能,将所有的旧镜像地址https://registry.npm.taobao.org 替换为新的镜像地址 https://registry.npmmirror.com。
在这里插入图片描述
最后重新 npm i,就好了,

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

闽ICP备14008679号