fengbindeMacBook-Pro:ant-design-cloud fengbin$ npm install
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/yorkie/download/yorkie-2.0.0.tgz failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/fengbin/.npm/_logs/2024-03-16T01_33_34_155Z-debug.log
解决方案:
npm cache clean --force
npm config set strict-ssl false
npm install
-----npm配置------
vi /Users/fengbin/.npmrc
registry=https://registry.npmmirror.com/
disturl=https://npm.taobao.org/dist
strict-ssl=false
文章讲述了在MacBookPro上使用npm时遇到证书过期错误(CERT_HAS_EXPIRED),提供了解决方案,包括清理npm缓存和修改npm配置文件,将registry指向npmmirror.com以绕过SSL问题。
1万+

被折叠的 条评论
为什么被折叠?



