本文主要是介绍npm ERR! code CERT_HAS_EXPIRED,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
执行npm i报错:
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/react-redux failed, reason: connect ETIMEDOUT 104.16.2.35:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
如图:
原因:这个报错是因为npm服务器的SSL证书证书过期了。
解决方法:
1.win + R打开cmd,依次执行下方的命令即可。
清除npm缓存
npm cache clean --force设置npm的严格SSL证书验证为false
npm config set strict-ssl false安装
npm install
这篇关于npm ERR! code CERT_HAS_EXPIRED的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!