安裝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了
文章來源: www.oschina.net,作者:NicholasLee,版權歸原作者所有,如需轉載,請聯系作者。