npm ERR! code CERT_HAS_EXPIRED npm ERR! errno CERT_HAS_EXPIRED

阅读 29

2024-02-01

文章目录

1.问题复现

npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/@huolala-tech%2fpage-spy-api failed, reason: certificate has expired

2.解决方案

1.第一种

#清除npm缓存
npm cache clean --force
#取消ssl证书验证
npm config set strict-ssl false

2.第二种

#清除npm缓存
npm cache clean --force
#更换官方的registry
npm config set registry https://registry.npmjs.org/

精彩评论(0)

0 0 举报