npm 下载报错
报错信息 : 证书过期 (CERT_HAS_EXPIRED)
D:\Apps\nodejs-v18.16.1\npx.cmd --yes create-next-app"@latest" . --ts
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/create-next-app failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Apps\nodejs-v18.16.1\node_cache\_logs\2024-01-22T10_27_35_078Z-debug-0.log
Done
解决 :
# 更新镜像源
npm config set registry http://registry.npmmirror.com
# 清理npm缓存
npm cache clean --force
官网 : npm | Home (npmjs.com)
这期就到这里 , 下期见!