Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update Ionic in the existing project

I was excited to see the Release version of Ionic, but found myself unable to update my existing project. Here is what I did.

  1. run npm install -g ionic

  2. Open bower.json in your App's root folder (the one above www)

  3. You will find something like this here:

     {
       "name": "MyAppName",
       "private": "true",
       "devDependencies": {
         "ionic": "driftyco/ionic-bower#xxxxxxxx"
       }
     }
    
  4. Change it to this (basically by changing the last line:

     {
       "name": "MyAppName",
       "private": "true",
       "devDependencies": {
         "ionic": "driftyco/ionic-bower#1.0.0-rc.1"
       }
     }
    
  5. Save the file

  6. Go to command line and run this in your App Folder

     bower update
     ionic lib update
    
  7. Run ionic lib to check the version number

Edit

This post relates to Windows OS, as I am using 64 bit Windows 7.

like image 894
AnR Avatar asked Mar 17 '15 07:03

AnR


2 Answers

I also had a lot of problems to update an existing ionic project. This is what I did to solve the issue:

  • Remove bower.json from www/lib/ionic
  • Execute ionic lib update from the source project.

This action will ask for confirmation, just type yes and your project will be updated to the latest version.

like image 164
Avión Avatar answered Oct 04 '22 06:10

Avión


You need not touch the bower.json file.

After npm install -g ionic, be in the root folder of your app and run this command:

ionic lib update

This will prompt you if you want to upgrade your project's Ionic version, i.e download and copy the new Ionic libraries.

like image 30
Keval Avatar answered Oct 04 '22 07:10

Keval