安裝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'node
錯誤這麼多,可是問題在於須要使用cnpmgit
執行npm install -g cnpm --registry=https://registry.npm.taobao.orggithub
再執行cnmp installnpm
就ok了code