本文主要是介绍npm 淘宝镜像到期,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
npm 淘宝镜像到期了
npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expirednpm ERR! A complete log of this run can be found in: D:\nodejs\node_cache\_logs\2024-01-23T11_00_28_143Z-debug-0.log
将npm淘宝镜像切换至淘宝的新镜像域名
// 1. 清空缓存
npm cache clean --force
// 2. 切换新源
npm config set registry https://registry.npmmirror.com
// 3. 查看源是否设置成功
npm config get registry
参考:
npm 淘宝镜像到期了,尽快切换(npm使用淘宝镜像安装时报错)
这篇关于npm 淘宝镜像到期的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!