npm 淘宝镜像到期了
npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired
bash
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:\nodejs\node_cache\_logs\2024-01-23T11_00_28_143Z-debug-0.log
将npm淘宝镜像切换至淘宝的新镜像域名
bash
// 1. 清空缓存
npm cache clean --force
// 2. 切换新源
npm config set registry https://registry.npmmirror.com
// 3. 查看源是否设置成功
npm config get registry
参考: