使用npm安装包时遇到错误信息:“npm ERR! request to https://registry.npm.taobao.org/hexo-cli failed, reason: certificate has expired”。
原因是npm使用的SSL证书过期。
解决方法:更新npm的根证书
1、查看当前设置:npm config list
2、然后修改镜像即可:npm config set registry 镜像源(推荐使用镜像源 https://registry.npmmirror.com
)