Node报错:npm error code ETIMEDOUT
1、报错详细信息
npm error code ETIMEDOUT npm error syscall connect npm error errno ETIMEDOUT npm error network request to https://registry.npmjs.org/express failed, reason: connect ETIMEDOUT 104.16.1.35:443 npm error network This is a problem related to network connectivity. npm error network In most cases you are behind a proxy or have bad network settings. npm error network npm error network If you are behind a proxy, please make sure that the npm error network 'proxy' config is set properly. See: 'npm help config'
2、分析错误原因
网络的连接超时问题
3、解决方案
方案一:切换很好的网络连接
方案二:使用国内的npm镜像源(淘宝)
npm config set registry https://registry.npmmirror.com