Npm error ! while updating ionic ! and now ionic is broken

I had ionic 1.7.1 installed… Today i decided to update it to 1.7.7… and it was taking forever to install spining the cursor… later i saw ionic was totally broken…

C:\Users\sd\Desktop>npm install -g ionic
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sd\\AppData\\Roaming
\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v4.2.1
npm ERR! npm  v3.3.9
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

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 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sd\\AppData\\Roaming
\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v4.2.1
npm ERR! npm  v3.3.9
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

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 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sd\\AppData\\Roaming
\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v4.2.1
npm ERR! npm  v3.3.9
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

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 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sd\\AppData\\Roaming
\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v4.2.1
 npm ERR! npm  v3.3.9
 npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

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! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498 
\registry.npmjs.org\liftoff\-\liftoff-0.12.1.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\liftoff\-\liftoff-0.12.1.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498  
\registry.npmjs.org\htmlparser2\-\htmlparser2-3.8.3.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\plist\-\plist-1.1.0.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\plist\-\plist-1.1.0.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\glob\-\glob-4.0.6.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
 \registry.npmjs.org\glob\-\glob-4.0.6.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\uglify-js\-\uglify-js-2.5.0.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\uglify-js\-\uglify-js-2.5.0.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\npm\-\npm-2.1.3.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\npm\-\npm-2.1.3.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\qs\-\qs-0.5.6.tgz
npm ERR! tar.unpack untar error C:\Users\sd\AppData\Local\Temp\npm-1884-d7001498
\registry.npmjs.org\qs\-\qs-0.5.6.tgz

I have good internet speed too !! even updated too latest npm…!!
Ionic lab works fine !!
Now how to install this ionic CLI … please help !!

I hope this wont affect my existing ionic projects

Avoid Node 4.x and npm 3 on Windows, there are still some issues.
Use Node 0.12.x

Windows is the worst platform for Node but if you want to be safer, at least use a node environment manager like nodist to install versions and switch between them.

Thanks for the reply !!

So can i directly install nodist without uninstalling existing node ? or shld i uninstall it then frshly install nodist ?

You should uninstall node before installing nodist

@gmarziou

I installed nodist !! cordova installed fine…

while installing ionic… it stucks at some random http 200 of some file !!! I tried 3 times… !

I think i will try switching internet connection !!

And,

nodist didnt install cordova globally… even after doing this…

npm install -g cordova

Any solution ? I read some posts on net which is the issue with nodist not making packages global…any suggestion ?

Sorry I have no idea.