How to update the Ionic in the existing project?

The CLI now has a way to update. Just run this command.

ionic lib update
1 Like

it is not work for created project.

This way to resolve my issue: modify “driftyco/ionic-bower#1.0.0-beta.14” to “driftyco/ionic-bower#1.0.0-rc.0” info in bower.json file which on the second directory of project directory.Then run “ionic lib update” with CLI in the project directory. So thank you! The last,i feel sorry for my poor english. : )

2 Likes

“ionic lib update” actually didn’t work for me.
It did update in the top-level bower.json but the lib under www/lib was still the old one.

“bower update” didn’t help either.
But deleting entirely the www/lib folder and calling “bower install” correctly loaded the latest version.
Not sure what was wrong… I’ll check if “ionic lib update” works next time.

ionic lib update from the root directory worked for me when I upgraded from beta to the main release! :slight_smile:

2 Likes

Strange, if I run ionic lib I get:

Local Ionic version: 1.0.0-rc.0  (<root dir>\<project dir>\www\lib\ionic\bower.json)
Latest Ionic version: 1.0.0-rc.2  (released 2015-03-30)
 * Local version is out of date

If I run ionic lib update I get:

bower ionic#1.0.0-rc.0          cached git://github.com/driftyco/ionic-bower.git#1.0.0-rc.0
bower ionic#1.0.0-rc.0        validate 1.0.0-rc.0 against git://github.com/driftyco/ionic-bower.git#1.0.0-rc.0

If I try the bower route and update the bower.json to rc2 and run ionic lib update I get:

bower ionic#1.0.0-rc.2          cached git://github.com/driftyco/ionic-bower.git#1.0.0-rc.2
bower ionic#1.0.0-rc.2        validate 1.0.0-rc.2 against git://github.com/driftyco/ionic-bower.git#1.0.0-rc.2
bower angular#1.3.13            cached git://github.com/angular/bower-angular.git#1.3.13
bower angular#1.3.13          validate 1.3.13 against git://github.com/angular/bower-angular.git#1.3.13
bower angular-animate#1.3.13    cached git://github.com/angular/bower-angular-animate.git#1.3.13
bower angular-animate#1.3.13  validate 1.3.13 against git://github.com/angular/bower-angular-animate.git#1.3.13
bower angular-sanitize#1.3.13   cached git://github.com/angular/bower-angular-sanitize.git#1.3.13
bower angular-sanitize#1.3.13 validate 1.3.13 against git://github.com/angular/bower-angular-sanitize.git#1.3.13
bower angular#>= 1.0.8          cached git://github.com/angular/bower-angular.git#1.3.15
bower angular#>= 1.0.8        validate 1.3.15 against git://github.com/angular/bower-angular.git#>= 1.0.8
bower                        ECONFLICT Unable to find suitable version for angular

So i need to update angular?? or…?

p.s. this is CLI version 1.3.18

EDIT:

D’OH!! bower update after upping the bower.json to rc2 fixes it, but it looks like after you do that the ionic lib update no longer works…

worked for me, updating from 1.0.0-rc.0 to 1.0.0-rc.4

Still not working for me if you have edited bower, the latest error you get is:

ionic lib update
bower ionic#1.0.0-rc.3      not-cached git://github.com/driftyco/ionic-bower.git#1.0.0-rc.3
bower ionic#1.0.0-rc.3         resolve git://github.com/driftyco/ionic-bower.git#1.0.0-rc.3
bower ionic#1.0.0-rc.3        download https://github.com/driftyco/ionic-bower/archive/v1.0.0-rc.3.tar.gz
bower ionic#1.0.0-rc.3         extract archive.tar.gz
bower ionic#1.0.0-rc.3    invalid-meta ionic is missing "ignore" entry in bower.json
bower ionic#1.0.0-rc.3        resolved git://github.com/driftyco/ionic-bower.git#1.0.0-rc.3

As before, it “does” work if you update with bower as before.

Just to reiterate, if you have not previously updated bower, ionic lib update will work as expected, I don’t understand why merely changing the ionic version in bower, then bower updating, breaks the ionic lib update command?

if you edit your bower file just run

bower install

try using
bower update ionic

Thanks for the suggestions, I won’t know for sure if these have worked until the next release candidate… but I’ll keep you posed

Change the Version in your bower.json

from old Version (rc.1)

"devDependencies": {
    "ionic": "driftyco/ionic-bower#1.0.0-rc.1"},

to new Version (rc.5)

"devDependencies": {
"ionic": "driftyco/ionic-bower#1.0.0-rc.5"},

and then run the Command

bower update ionic

That worked for me

2 Likes

Yes that does work and is indeed what I pointed out further above. My problem is ionic lib update stops working after you do that.

Have a squiz in your www/lib/ionic folder and see if there are any bower files there. If there are, delete them, then return to the root of your ionic project and run:

ionic lib update -d

Which should kick off the process. Without deleting the bower files within the ionic folder (seem to be there from older pre-rc versions), it will kick out of the process without updating your version.

5 Likes

I just updated my project with Ionic 1.0 rc5 to the new 1.0.0. Everything works just fine in the browser (ionic serve). But when I build to Android, the app that was running ok before, go now to blank when I install it on my phone. Anyone with the same problem?

No issues with blank screens, but am having issues referencing the facebook and google places js sdk’s (now returning 404’s). Have you checked the debug panel @rsalinas?

1 Like

We upgraded to v1.0.0 from beta12, spent two days trying to get the app to work at least as good as it once did, but are having such severe performance issues we need to revert to the old version.

How can I revert to an old version of ionic? Is there something like “ionic lib install --VERSION”?

I’m not sure to understand how ionic and bower update my project…
I created a ionic project and when I type

jerome@HP-8000:~/dev/www/myAppIonic [master] $ ionic info
Your system information:
Cordova CLI: 4.2.0
Gulp version:  CLI version 3.8.11
Gulp local:  
Ionic Version: 1.0.0-beta.14
Ionic CLI Version: 1.4.4
Ionic App Lib Version: 0.0.20
OS: Distributor ID:	Ubuntu Description:	Ubuntu 12.04.5 LTS 
Node Version: v0.10.37

So I wanted to update to the latest ionic version and I typed :

jerome@HP-8000:~/dev/www/imageProAppIonic [master] $ ionic lib update
bower ionic#1.0.0               cached git://github.com/driftyco/ionic-bower.git#1.0.0
bower ionic#1.0.0             validate 1.0.0 against git://github.com/driftyco/ionic-bower.git#1.0.0

So it should be updated to the latest version, but not ! When I type again a ionic info, I have same informations as before…
How to update ionic in my project ?
Thank you.

Have a squiz in your www/lib/ionic folder and see if there are any bower files there. If there are, delete them, then return to the root of your ionic project and run:
ionic lib update -d
Which should kick off the process. Without deleting the bower files within the ionic folder (seem to be there from older pre-rc versions), it will kick out of the process without updating your version.

^^^^ This is what was required to solve my problem ^^^^

3 Likes

wow, this works for me also! thx!