Reputation: 8955
I am trying to upgrade Ionic to the latest version. Looking here, it shows that the latest version is 3.0.0
. I also follow this tutorial.
So I do the following:
sudo npm uninstall -g ionic
sudo npm install -g ionic@latest
console:
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
└── [email protected]
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 would expect it to update the Ionic CLI Version: 2.1.18
to 3.0.0
. Is that a correct assumption? If so, do you know what I am doing incorrectly?
Thanks
Upvotes: 10
Views: 37828
Reputation: 1397
The ionic CLI package has been renamed @ionic/cli https://twitter.com/ionicframework/status/1223268498362851330
So you should uninstall ionic from your global
npm uninstall -g ionic
and add the new package name.
npm install -g @ionic/cli@latest
In case anyone comes here from google.
Upvotes: 10
Reputation: 2438
I would start trying the simple things before.
I just ran...
npm --version
Then, the answer was...
4.6.0
╭──────────────────────────────────────╮
│ │
│ Update available 4.6.0 → 4.12.0 │
│ Run npm i -g ionic to update │
│ │
╰──────────────────────────────────────╯
So, I did...
npm i -g ionic to update
After that...
npm --version
6.5.0
Upvotes: 0
Reputation: 7412
I simple run
$ ionic --version
$ 4.2.1
$ sudo npm i -g ionic@latest
$ ionic --version
$ 4.8.0
Upvotes: 7
Reputation: 845
We did big chat. Things which were helpful:
npm uninstall -g ionic
or manually from rm -rf /usr/local/lib/node_modules
. Don't forget remove symlink too: rm -rf /usr/local/bin/ionic
ionic -v
npm root -g
path is right like /usr/local/lib/node_modules
try to install npm install -g ionic@latest
. Then you should get correct output of ionic -v
Upvotes: 18