Upgrading

Upgrading an Ember CLI App

Steps to upgrade to the latest version of Ember CLI are included with each release, but these are the common steps one would follow to update Ember CLI using NPM from within your project directory.

Setup

  • Remove old global ember-cli
npm uninstall -g ember-cli
  • Clear NPM cache
npm cache clean
  • Clear Bower cache
bower cache clean
  • Install a new global ember-cli, replacing X.X.X with the version of ember-cli you want to install
npm install -g ember-cli@X.X.X

Project Update

  • Delete temporary development folders
rm -rf node_modules bower_components dist tmp
  • Update your project’s package.json file to use the latest version of ember-cli, replacing X.X.X with the version of ember-cli you want to install
npm install --save-dev ember-cli@X.X.X
  • Reinstall NPM dependencies
npm install
  • Reinstall Bower dependencies
bower install
  • Run the new project blueprint on your projects directory. Please follow the prompts, and review all changes (tip: you can see a diff by pressing d).
ember init

The most common sources of upgrade pain are not clearing out old packages in the first step of the project update and missing a change in the last step of the project update. Please review each change from the last step carefully to ensure you both have not missed a change from the upgrade and that you have not accidentally removed code you may have added to your project during your work.

When the upgrade process has completed, you should be able to issue the ember -v command and see that the version: noted in the resulting output matches the version you just upgraded to.