记录npm镜像源报错:registry.npm.taobao.org reason: certificate has expired

468 阅读1分钟

一、完整报错信息

安装某插件时,控制台报错如下信息:
npm ERR! request to https://registry.npm.taobao.org/xxx-plugin failed, reason: certificate has expired

二、报错原因

原镜像源:https://registry.npm.taobao.org 替换为
新镜像源:https://registry.npmmirror.com 

三、解决

步骤一、命令行操作
npm config set registry https://registry.npmmirror.com

四、命令回顾

查看镜像源:npm config get registry
设置镜像源:npm config set registry https://xxx.com