本文介绍: 将npm淘宝镜像切换至淘宝的新镜像域名。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 expired

npm ERR! A complete log of this run can be found in: D:nodejsnode_cache_logs2024-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使用淘宝镜像安装时报错)

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注