npm install error – ECONNRESET – IONIC INSTALL – npm install -g ionic fails with ECONNRESET


Here is the solution to ECONNRESET issues while working with npm

  • npm install -g ionic fails with ECONNRESET
  • npm ERR! network read ECONNRESET

It is a quite common error which occurs while installing modules using npm e.g. ionic

npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is 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 ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" 
"C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" 
"install" "-g" "cordova" "ionic"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

 

What is the solution?

This can be resolved by updating npm registry protocol from https:// to http://

How?

$ npm config get registry
    https://registry.npmjs.org/
$ npm config set registry http://registry.npmjs.org/
$ npm config get registry
    http://registry.npmjs.org/

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s