1

I try to install ionic, but when run npm install -g ionic I have error below.

npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ECONNRESET

npm ERR! network socket hang up
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 settin
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'

My network don't have proxy, and when i run npm get proxy it said null

I already try to clean cache, and change registry to http://registry.npmjs.org/ and https://registry.npmjs.org/ and also I can access http://registry.npmjs.org/yo, but still have same error when installing ionic.

hope any solution for my issue.

Thank you,

madrick
  • 221
  • 1
  • 3
  • 15
  • It worked for me https://stackoverflow.com/questions/18419144/npm-not-working-read-econnreset – Kapil May 03 '18 at 14:13

1 Answers1

1

There is some dependency problem.

see below link :

http://ionicframework.com/docs/concepts/development.html

Improved answer Below :
By default, brew install latest stable version of node (in this case 0.12.4). Based on the warning messages, ionic is expecting a lower version of node.
I was able to to solve this issue by installing a prior version of node (0.10.38).

$ brew remove node
$ rm ~/.node   (might want to rename instead)
$ brew install homebrew/versions/node010 
$ node --version
$ v0.10.38

Run npm install -g ionic worked as expected.

j0k
  • 22,600
  • 28
  • 79
  • 90
Monty
  • 1,110
  • 7
  • 15