1. 程式人生 > >npm安裝出錯

npm安裝出錯

npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/npm failed, reason: socket hang up
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 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'

先:
npm install -g cnpm --registry=https://registry.npm.taobao.org
然後進入工程所在目錄:
cnpm install
然後成功了!

cnpm install pm2 -g