npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/npm failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zhy\AppData\Roaming\npm-cache\_logs\2024-03-06T13_17_17_493Z-debug.log
今天在更新npm的时候遇到了这个报错,经过搜索,得知是签证过期导致的,可以通过关闭ssl检查来解决:
npm config set strict-ssl false
效果:
C:\Users\zhy\AppData\Roaming\npm\npx -> C:\Users\zhy\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
+ npm@8.11.0
added 201 packages from 106 contributors in 5.421s
成功解决。