Upgrade Ionic to latest version - ionic-framework

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
└── 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 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

We did big chat. Things which were helpful:
Be sure that you completely delete all previous version with 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
After completely deletion you should see error: command not found of ionic -v
And now if your 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

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.

I simple run
$ ionic --version
$ 4.2.1
$ sudo npm i -g ionic#latest
$ ionic --version
$ 4.8.0

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

Related

I have upgraded to ionic 4 but my project doesnt support the version now I need to downgrade to ionic 3. What should i do? [duplicate]

The recent version is 3.2.0 and I'm facing lot's of issues with it like the ionic serve command not working.
npm install -g ionic#version_number
ex: if you want to install ionic 2.5.0,
npm install -g ionic#2.5.0
edit: to list all versions of ionic, npm info ionic
You can downgrade to your old version by running below command:
npm install -g ionic#3.9.2
Get your version here
IONIC CLI VERSIONS
You may try uninstalling it first: npm uninstall -g ionic
then install it again with the version that you want to install npm install -g ionic#x.x.x
then check ionic version with ionic --version you may need to restart your terminal to get the latest version running
First thing first, uninstall the current version:
npm uninstall -g ionic
then, install the version you want :
npm install -g ionic#"the version for example #3.20.0"
You just need to do like this:
npm install -g ionic#3.1.0
Changelog
Sometimes it throws error while overwriting the existing files , so add --force
Ex, If you want to downgrade to version 3.20, run:
npm i -g ionic#3.20 --force

Ionic installation on macOs

I am trying to install ionic and every time I try to install it says:
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
and I can't even check ionic -v to check version as it is not installed.
I can check npm version as it is installed correctly.
➜ ~ node -v
v8.7.0
➜ ~ npm -v
5.4.2
➜ ~ npm install -g cordova ionic
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
/Users/bilaltariq/.npm-packages/bin/cordova -> /Users/bilaltariq/.npm-packages/lib/node_modules/cordova/bin/cordova
/Users/bilaltariq/.npm-packages/bin/ionic -> /Users/bilaltariq/.npm-packages/lib/node_modules/ionic/bin/ionic
+ cordova#7.1.0
+ ionic#3.13.2
updated 2 packages in 27.258s
Had the same problem. The fix is to install ionic CLI globally:
As the developer user execute the following from your ionic project root directory:
npm uninstall ionic
then as user "root" execute the following:
npm i -g ionic#latest
after that, you should be able to use the new ionic CLI version 4.12.0

Error installing ionic on Mac OS

I'm trying to install the ionic on but it has error.
I've checked other articles here, but their solution does not help.
I am using the command:
sudo npm install -g ionic cordova
I am with:
$ npm --version
3.10.9
$ node --version
v6.9.2
And the error:
UPDATE:
There are mentions of this on the ionic forums if you do a search there
What I would so is completely remove ionic and Cordova by running
npm uninstall -g cordova
And
npm uninstall -g ionic
Then I would start the process again with
npm install -g cordova ionic
Just note that this docs say to install Cordova and then Ionic whereas it looks like you did it the other way around which could have caused some issues.

Ionic Framework : How to Upgrade to Ionic 2

I use ionic stable version to build Hybrid Mobile Application and things going fine.
Now, I would like to use Ionic 2 for its components features. Hence, I have installed ionic on ubuntu as
$ npm install -g ionic#beta
And then start using ionic started template as
$ ionic start IonicMyV2 --v2
However, the above command always brings the stable version ionic template.
What I am doing wrong? What procedure do I have to follow to use Ionic 2?
My problem has been resolved by command
sudo npm install -g ionic#beta cordova
You can remove the need for sudo with npm by installing NodeJS via brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node
node -v
npm -v
npm install -g ionic#beta
You should run below command for upgrade to ionic 2.
npm install -g cordova ionic

update to the latest ionic version

after ionic team has officially released ionic 1.2 versions
I checked
ionic -v
command to get my current version and I found it 1.7.12, then I did
npm install -g ionic
hopefully to update my current version and it just still on the previous version 1.7.12, so what is just the command I have to run to get the ionic 1.2 instead of ionic 1 which I already have now?
It is not a bug in npm, the 1.7.12 version that is shown when you run:
ionic -v
1.7.12
is the ionic-cli version, the command line utility, you can find it here: https://www.npmjs.com/package/ionic
The ionic 1.2 version that you are expecting, is the ionic framework version: http://code.ionicframework.com/# latest is 1.2.4 - Copenhagen
If you want to check the framework version that your app is running, go to your app directory and type:
ionic lib
Local Ionic version: 1.2.4 (<path>/myApp/www/lib/ionic/version.json)
Latest Ionic version: 1.2.4 (released 2016-01-08)
* Local version up to date
It may be bug with npm.
First Uninstall ionic and cordova using
npm uninstall cordova ionic
Then update node and npm
Install cordova and ionic
npm install -g cordova ionic
Check the version.
you can always run
sudo npm uninstall -g ionic && sudo npm install ionic