# Updating Ionic2 Alpha

**URL:** <https://forum.ionicframework.com/t/updating-ionic2-alpha/36671>\
**Category:** ionic-v3\
**Created:** [November 9, 2015, 5:02pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671 "2015-11-09T17:02:15Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhilM](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@PhilM](https://forum.ionicframework.com/u/PhilM)\
**Post date:** [November 9, 2015, 5:02pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/1 "2015-11-09T17:02:15Z")

</div>

I’d like to frequently update the library of an Ionic 2 alpha project. Can anyone recommend an easy way to keep a project in sync with the latest Ionic 2 alpha version via command line?

For instance, would using `ionic lib update` work or should I just edit “ionic-framework” in package.json ?

Running `ionic lib` returns “undefined” for “Local Ionic Version”, and the “Latest Ionic Version” is set to 1.1.0, so I’m a little nervous to update the library via command line.

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [November 11, 2015, 1:24am UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/2 "2015-11-11T01:24:29Z")

</div>

We’re moving away from bower in v2. Running `ionic lib update` is running `bower update ionic` under the hood, so this won’t work with v2.

I would recommend (for now) updating the `package.json` file to the alpha version you’d like, the latest is currently `2.0.0-alpha.31`, and then running `npm install`. You may want to remove the `ionic-framework` folder from `node_modules` prior to doing this, as it can fix some issues.

**Note: we found some performance issues with alpha 31 and we are working through them, so it may be better to stay on `alpha.30` or below until we get a more stable release out.**

There were also some changes to paths in alpha 31, so if you choose to update to `alpha.31` you may want to look at the conference app to see what to update in the [webpack.config](https://github.com/driftyco/ionic-conference-app/commit/8c71fca9dc3d736ed75eeca6045af4f9cc8e4874).

If you wanted to develop against the 2.0 branch of ionic, you could clone the repo locally and use `npm link` to symlink it, but I don’t recommend it as it is not stable. See these notes for more information: [https://github.com/driftyco/ionic/tree/2.0/scripts#developing-against-ionic-locally](https://github.com/driftyco/ionic/tree/2.0/scripts#developing-against-ionic-locally)

Sorry if any of this is confusing, we’re still working through it. 🙂

---

<div class="post-metadata">

**Author:** ![PhilM](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@PhilM](https://forum.ionicframework.com/u/PhilM)\
**Post date:** [November 11, 2015, 4:04pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/3 "2015-11-11T16:04:54Z")

</div>

Awesome. Thank you for the reply. I’ve been really enjoying working with ionic 2.

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [November 11, 2015, 5:16pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/4 "2015-11-11T17:16:53Z")

</div>

Glad to hear that! 🙂 If you run into any issues or have any feedback, please open an issue on our github: [https://github.com/driftyco/ionic/issues](https://github.com/driftyco/ionic/issues)

---

<div class="post-metadata">

**Author:** ![fredgate](https://avatars.discourse-cdn.com/v4/letter/f/f17d59/32.png) [@fredgate](https://forum.ionicframework.com/u/fredgate)\
**Post date:** [November 20, 2015, 12:16am UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/5 "2015-11-20T00:16:45Z")

</div>

How can we know the last version of the alpha ?

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [November 20, 2015, 5:26am UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/6 "2015-11-20T05:26:00Z")

</div>

The latest version of 2.0 can be found on npm here: [https://www.npmjs.com/package/ionic-framework](https://www.npmjs.com/package/ionic-framework)

And we are working on keeping the conference app up to date with the latest version: [https://github.com/driftyco/ionic-conference-app](https://github.com/driftyco/ionic-conference-app)

---

<div class="post-metadata">

**Author:** ![richardshergold](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardshergold/32/91823_2.png) [@richardshergold](https://forum.ionicframework.com/u/richardshergold)\
**Post date:** [November 20, 2015, 8:45am UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/7 "2015-11-20T08:45:15Z")

</div>

@brandyshea how exactly do I update my version of Ionic 2 ?

If I type

> ionic info

I get:

> Cordova CLI: 5.4.0  
> Gulp version: CLI version 3.9.0  
> Gulp local:  
> Ionic CLI Version: 2.0.0-alpha.23  
> Ionic App Lib Version: 2.0.0-alpha.22  
> ios-deploy version: 1.8.2  
> ios-sim version: 5.0.3  
> OS: Mac OS X Yosemite  
> Node Version: v0.12.4  
> Xcode version: Xcode 7.1.1 Build version 7B1005

(I’m now on El Capitan so not sure why it still says Yosemite but thats another issue I guess?)

[This](https://www.npmjs.com/package/ionic-framework) page says the latest version of Ionic 2 is 2.0.0-alpha.34 so I tried updating mine my typing:

> npm update -g ionic@alpha

Presumably this is not correct (I’m very new to all this npm stuff) because typing **ionic info** still gives me:

> Ionic CLI Version: 2.0.0-alpha.23  
> Ionic App Lib Version: 2.0.0-alpha.22

What do I have to do to make sure I’m running the latest version?

---

<div class="post-metadata">

**Author:** ![richardshergold](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardshergold/32/91823_2.png) [@richardshergold](https://forum.ionicframework.com/u/richardshergold)\
**Post date:** [November 20, 2015, 8:47am UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/8 "2015-11-20T08:47:33Z")

</div>

Sorry @brandyshea just seen the other notes about updating. Will try that.

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [November 20, 2015, 2:49pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/9 "2015-11-20T14:49:57Z")

</div>

Just to clear some things up. The package called `ionic` on npm is for the Command Line Interface (CLI). So when you run `npm install -g ionic@alpha` you are updating the CLI which allows you to type commands such as `ionic serve` and `ionic info`.

The package called `ionic-framework` is what holds the source code for Ionic 2 and allows you to use Ionic components in your app. That can be found here: [https://www.npmjs.com/package/ionic-framework](https://www.npmjs.com/package/ionic-framework)

Normally when you want to add a package to a project you would install it with a `--save` flag and it would add itself to the package.json file. We have already added it though to the starters and conference app, so when you download the conference app and run `npm install` you are installing the `ionic-framework` package into `node_modules` in order to be used. The starter app runs `npm install` for you when you start a new project.

So for right now since the version of `ionic-framework` is already listed in package.json you can update it manually in that file to update to a specific version and then run `npm install` inside the project directory. You can also run `npm install ionic-framework --save` to update to the latest version. I imagine we will add a command to do this for you in the future but it hasn’t been discussed yet.

This is something we plan on going over in the docs in detail, but we haven’t yet. Let me know if anything I said was confusing. 🙂

---

<div class="post-metadata">

**Author:** ![richardshergold](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardshergold/32/91823_2.png) [@richardshergold](https://forum.ionicframework.com/u/richardshergold)\
**Post date:** [November 20, 2015, 2:55pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/10 "2015-11-20T14:55:36Z")

</div>

Thank you - that helps a lot.

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [November 20, 2015, 3:31pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/11 "2015-11-20T15:31:20Z")

</div>

Also, make sure you run `ionic info` inside of the project in order to see the Ionic version:

Your system information:

Cordova CLI: 5.3.3  
Gulp version: CLI version 3.9.0  
Gulp local:  
**Ionic Version: 2.0.0-alpha.34**  
Ionic CLI Version: 2.0.0-alpha.23  
Ionic App Lib Version: 2.0.0-alpha.22  
ios-deploy version: Not installed  
ios-sim version: 5.0.3  
OS: Mac OS X Yosemite  
Node Version: v0.12.4  
Xcode version: Xcode 6.4 Build version 6E35b

And I just looked at the link you posted @richardshergold - those are instructions for using the master branch of Ionic 2 to develop your app, which I do not recommend since it is not stable.

---

<div class="post-metadata">

**Author:** ![kfbishop](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/kfbishop/32/67066_2.png) [@kfbishop](https://forum.ionicframework.com/u/kfbishop)\
**Post date:** [November 20, 2015, 4:14pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/12 "2015-11-20T16:14:05Z")

</div>

Based on this, it would seem more logical to change/alias the “ionic” package to “ionic-cli”, and avoid all the confusions.

---

<div class="post-metadata">

**Author:** ![richardshergold](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardshergold/32/91823_2.png) [@richardshergold](https://forum.ionicframework.com/u/richardshergold)\
**Post date:** [November 20, 2015, 4:17pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/13 "2015-11-20T16:17:35Z")

</div>

@brandyshea I’ve removed that link from my post now just in case it caused anyone to do the wrong thing.

---

<div class="post-metadata">

**Author:** ![Gajotres](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gajotres/32/98564_2.png) [@Gajotres](https://forum.ionicframework.com/u/Gajotres)\
**Post date:** [January 15, 2016, 10:47pm UTC](https://forum.ionicframework.com/t/updating-ionic2-alpha/36671/14 "2016-01-15T22:47:00Z")

</div>

> [@brandyshea](#):
>
> We’re moving away from bower in v2. Running ionic lib update is running bower update ionic under the hood, so this won’t work with v2.
> 
> I would recommend (for now) updating the package.json file to the alpha version you’d like, the latest is currently 2.0.0-alpha.31, and then running npm install. You may want to remove the ionic-framework folder from node\_modules prior to doing this, as it can fix some issues.
> 
> Note: we found some performance issues with alpha 31 and we are working through them, so it may be better to stay on alpha.30 or below until we get a more stable release out.
> 
> There were also some changes to paths in alpha 31, so if you choose to update to alpha.31 you may want to look at the conference app to see what to update in the webpack.config.
> 
> If you wanted to develop against the master branch of ionic2, you could clone the repo locally and use npm link to symlink it, but I don’t recommend it as it is not stable. See these notes for more information: [ionic2-app-base/README.md at master · ionic-team/ionic2-app-base · GitHub](https://github.com/driftyco/ionic2-app-base/blob/master/README.md#notes)
> 
> Sorry if any of this is confusing, we’re still working through it. 😄

You’re a saint, thank you 😄

You saved me from posting this question again
