npm install 时 certificate has expired 错误的解决办法
报错:npm ERR! request to https://registry.npm.taobao.org/events failed, reason: certificate has expired
npm install
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/events failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in:
npm ERR! /.npm/_logs/2024-01-24T08_52_27_547Z-debug.log
ERROR: Job failed: exit status 1
原因:证书过期
简单粗暴的解决办法:
关闭 npm ssl 严格证书检查
npm set strict-ssl false
或切换到官方源: npm config set registry https://registry.npmjs.org/ 标签:npm,certificate,ERR,registry,install,expired From: https://www.cnblogs.com/gaoyanbing/p/18006744