安装node以后,觉得npm虽然下载慢一点,但是还能接受,就没有安装cnpm。直达自己从github clone了几个开源程序,发现npm install失败了。报错npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/@nodelib%2ffs.stat
, reason: connect ETIMEDOUT 104.16.20.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
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
错误这么多,但是问题在于需要使用cnpm
执行npm install -g cnpm --registry=https://registry.npm.taobao.org
再执行cnmp install
就ok了
网友评论