Levvel Blog - Upgrade a New Ember-CLI 1.13.8 Project to Use Ember 2.1 and Ember Data 2.1

Upgrade a New Ember-CLI 1.13.8 Project to Use Ember 2.1 and Ember Data 2.1

Note: This is targeted for new Ember-CLI projects. If you are upgrading an existing Ember-CLI 1.13.x application to use Ember 2.1, you may run into issues with the new view layer, HTMLbars and some of your addons you may have installed. Unfortunately, the addon maintainers will have to make their blueprints or addons compatible with HTMLbars.

Things move quickly in the JavaScript world, and it is almost guaranteed to move beyond what I am writing now by the time you end up reading this. Ember-CLI provides a very familiar feeling of creating your front-end application if you have ever written a Ruby on Rails application. It provides you with generators, “blueprints” (which are something similar to rails engines) and a way to easily install addons.

At the time of this writing, Ember-CLI is on version 1.13.8, which is the latest version if you were to install it from scratch via npm, as it is suggested in the latest Ember.js guides. The problem with this, however, is the guides reference Ember 2.1 and Ember Data 2.1.

As with any open source community, you have to know where to look, and who to follow to get the most up-to-date and current information for your project, and I have done that for you!

To update an Ember-CLI application to use Ember 2.1 and Ember Data 2.1 make the changes below. (note these instructions are targeted for mac / linux users, windows instructions should be similar. I am assuming familiarity with the bower package manager, and npm)

Change these package versions in your bower.json to the ones shown in this diff.

Next is to do the same for your package.json as shown in this diff.

Now remove your bower_components folder from your application root.

Upgrade a new Ember-CLI 1.13.8 project to use Ember 2.1 and Ember Data 2.1

Last step is to run your bower install and npm install commands.

Finally, ember serve it up, and enjoy!

Related Posts