Error updating Ionic CLI


#1

After i decided to update my ionic CLI to the latest version, it remove the current ionic installation and did not install again i keep getting different variety of error, pls how do you think i can go about it, getting ly CLI working again, am in the middle of a project.
This is the image of the errpr http://prntscr.com/69k5p1

Thanks.


#2

Now, I have updated my node package, am getting another error log: http://prntscr.com/69l081
Can any one help me get this fixed.

Thanks


#3

npm install -g ionic?


#4

I have done that, i get thesame issues http://i.imgur.com/oGGKvMU.png

Thnaks for the reply, more help will be appreciated


#5

Hmm, so lets try this, can you past in your node and npm version?
I believe there were some issues with node v0.12.0 for windows users.
I’d trying install 0.10.36 if possible.
Let me know if that helps


#6

I have done as instructed but i still get thesame result

$ npm install -g cordova
npm ERR! Failed to parse json
npm ERR! Unexpected token
npm ERR! File: C:\Users\Akinsanya Olanrewaju\AppData\Roaming\npm-cache\cordova-j
s\3.7.3\package\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! System Windows_NT 6.2.9200
npm ERR! command “c:\Program Files (x86)\nodejs\node.exe” “c:\Program Files
(x86)\nodejs\node_modules\npm\bin\npm-cli.js” “install” “-g” "cordova"
npm ERR! cwd c:
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! file C:\Users\Akinsanya Olanrewaju\AppData\Roaming\npm-cache\cordova-js
\3.7.3\package\package.json
npm ERR! code EJSONPARSE
npm ERR! not ok code 0


#7

Are you doing it as an admin? I always use an admin terminal in windows for this.


#8

I get some help from stackoverflow
saying i should run npm cache clean first,
try npm install -g cordova
npm install -g cordova@3.6.3-0.2.13

Now this is the error am getting this if i run it with admin
C:>npm install -g cordova

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 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’

npm ERR! System Windows_NT 6.2.9200
npm ERR! command “C:\Program Files (x86)\nodejs\\node.exe” “C:\Program File
s (x86)\nodejs\node_modules\npm\bin\npm-cli.js” “install” “-g” "cordova"
npm ERR! cwd C:
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! syscall read
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! not ok code 0

But am not under any proxy

When i run the node cmd, under admin, i get this error

C:>npm install -g cordova
npm ERR! fetch failed http://registry.npmjs.org/glob/-/glob-4.0.6.tgz
npm ERR! fetch failed http://registry.npmjs.org/glob/-/glob-4.0.6.tgz
npm ERR! fetch failed http://registry.npmjs.org/base64-js/-/base64-js-0.0.6.tgz
npm ERR! fetch failed http://registry.npmjs.org/lodash-node/-/lodash-node-2.4.1.
tgz

Is there any alternate way of getting cordova install

Thanks you all for your contribution.


#9

Thank you all for your answer, i have had the issues resolve from all of your contribution. This are the step i followed.

npm cache clean
Bring back the node version to v0.10.36 as suggested that the latest version of node may not be compatible for the new cli for window users.
Run the node cli or cmd in admin mode
npm install -g cordova
Thank your all for your time and contribution


#10

Fixed the issue for me as well. Thanks.