`npm error code CERT_HAS_EXPIRED‘ 问题
问题:
npm error code CERT_HAS_EXPIRED
npm error errno CERT_HAS_EXPIRED
npm error request to https://r2.cnpmjs.org/string_decoder/-/string_decoder-1.3.0.tgz failed, reason: certificate has expired
npm error A complete log of this run can be found in: /home/dev/.npm/_logs/2025-08-03T10_23_08_154Z-debug-0.log
淘宝镜像证书过期,尝试用以下方法。
npm config set registry https://mirrors.huaweicloud.com/repository/npm/
npm cache clean --force
npm install -g npm
reference
---
npm ERR! errno CERT_HAS_EXPIRED(淘宝镜像证书过期)
https://www.cnblogs.com/zhangyouwu/p/18136041