报错提示:

提示淘宝镜像过期

ERR_PNPM_META_FETCH_FAIL  GET https://registry.npm.taobao.org/needle: request to https://registry.npm.taobao.org/needle failed, reason: certificate has expired

解决方案:

1、查看当前的npm镜像设置:npm config list

npm报错:request to https://registry.npm.taobao.org failed, reason certificate has expired_缓存


2、清空缓存:npm cache clean --force

npm报错:request to https://registry.npm.taobao.org failed, reason certificate has expired_node.js_02


3、然后修改镜像即可:npm config set registry https://registry.npmjs.org/ (或npm config delete registry

4、再次运行: npm config list,查看 registry 已经被更改为默认的 npm 公共镜像地址。