Chris Cortes
Chris Cortes

Reputation: 11

Can't update ionic cordova / ionic 2

npm update -g ionic cordova

ENONET ERROR

As title says it won't let update it. I even ran cmd as admin in case I didn't have access to all the files for cordova/node/ionic. I'm stressing over this because I need to use ionic 2 for college and my ionic is version 2.1.1.

Upvotes: 0

Views: 331

Answers (5)

Somnath
Somnath

Reputation: 406

Use Nodejs command prompt

Then use

npm update -g cordova ionic

Upvotes: 0

Somnath
Somnath

Reputation: 406

Use nodejs command prompt for update or install ionic version and run your all code using node CMD

Upvotes: 0

Abhishek Pandya
Abhishek Pandya

Reputation: 129

Use following command to install latest Ionic and Cordova. From your log I can see that you are using Windows so you don't required to use sudo command. Just use following command:

npm install -g ionic cordova 

Upvotes: 0

Omkar Tondawalkar
Omkar Tondawalkar

Reputation: 225

  1. Firstly update node js

    Clear NPM's cache:

    sudo npm cache clean -f
    

    Install a little helper called 'n'

    sudo npm install -g n
    

    Install latest stable Node.js version

    sudo n stable
    
  2. Now Install Ionic

    npm install -g cordova ionic
    
  3. Try uninstalling and installing again if not works

Upvotes: 0

Veerendra Borra
Veerendra Borra

Reputation: 1286

Remove cordova and ionic completely

sudo npm uninstall -g cordova
sudo npm uninstall -g ionic

then install again

sudo npm install -g ionic cordova

Upvotes: 1

Related Questions