npm 淘宝镜像到期了

npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired

npm ERR! code CERT_HAS_EXPIREDnpm ERR! errno CERT_HAS_EXPIREDnpm 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使用淘宝镜像安装时报错)