npm安裝出錯
阿新 • • 發佈:2018-12-23
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! 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