Update Ionic to the latest version

I am trying to update Ionic to the latest version. If you look here it shows that the latest version 3.0.0

. I am also following this tutorial.

So I am doing the following:

sudo npm uninstall -g ionic
sudo npm install -g ionic@latest

      

Prefixes:

Richards-MacBook-Pro:theWhoZoo richardmarais$ sudo npm install -g ionic
Password:
/Users/richardmarais/npm-global/bin/ionic -> /Users/richardmarais/npm-global/lib/node_modules/ionic/bin/ionic
/Users/richardmarais/npm-global/lib
└── ionic@3.0.0 

      

But when I run:

ionic -v

      

I get:

2.1.18

      

and

ionic info

      

I get:

Your system information:

Cordova CLI: 6.4.0 
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v7.10.0
Xcode version: Xcode 8.3.2 Build version 8E2002

      

I expect it to update the value Ionic CLI Version: 2.1.18

to 3.0.0

. Is this a correct assumption? If so, do you know what I am doing wrong?

thank

+3


source to share


2 answers


We chatted. Things that were helpful:



  • Make sure you completely uninstall all previous versions using npm uninstall -g ionic

    or manually from rm -rf /usr/local/lib/node_modules

    . Don't forget to remove the symbolic link as well:rm -rf /usr/local/bin/ionic

  • After completely removing, you should see an error: command not found from ionic -v

  • And now if your path is npm root -g

    right like /usr/local/lib/node_modules

    , try installing npm install -g ionic@latest

    . Then you should get the correct outputionic -v

+6


source


I'm just running



$ ionic --version
$ 4.2.1
$ sudo npm i -g ionic@latest 
$ ionic --version
$ 4.8.0

      

0


source







All Articles