sudo npm install -g ionic on Mac

I am able to install node on mac and cordova

When I run

node -v

it gives v0.12.2.

and npm -v is 2.7.4

and cordova -v is 5.0.0.

Now I tried sudo npm install -g ionic it gives me error

network read ECONNRESSET

network if you are behind the proxy , please make sure that the proxy and so on

I have no idea how to set a proxy.

I was having same problem on Windows 8 (64 bit)

Solution:

Don't forget to install other dependencies before installing ionic http://ionicframework.com/docs/guide/installation.html

1) Uninstall Node from Control Panel

2) Restart PC

3) Download (MSI Installer) older version of Node from http://nodejs.org/dist/v0.10.38/ and for 64bit http://nodejs.org/dist/v0.10.38/x64/

4) Install Node version 0.10.38

5) npm install -g cordova

6) npm install -g ionic

Done!