用npm下载软件突然报错,提示registry过期了

npm error request to https://registry.npm.taobao.org/pnpm failed, reason: certificate has expired

首先需要清空缓存

npm cache clean --force

查看一下目前的registry

npm config get registry

用的还是老版的淘宝镜像https://registry.npm.taobao.org
更新成新版的

set registry https://registry.npmmirror.com

查看一下是否更新成功

npm config get registry

已经变成https://registry.npmmirror.com

接下来重新下载,成功
在这里插入图片描述

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐