It’s been awhile, so let’s upgrade!
–
Oh how the time flies. Personally projects sometimes need to take a back burner. That’s ok but once we get back at it we should make sure that all our libraries we are using are up-to-date. The biggest news is that ember-cli finally released a 2.0 version. Luckily they have an easy to follow set up steps to upgrade. Unfortunately it can take some time and you have to rebuild all your node_modules and there is no guarantee that everything will work. You can find the steps repeated from the ember release site. You might also want to upgrade bower while at it.
####Setup
- npm uninstall -g ember-cli – Remove old global ember-cli
- npm cache clean – Clear NPM cache
- bower cache clean – Clear Bower cache
- npm install -g ember-cli@2.2.0-beta.3 – Install new global ember-cli
####Project Update
- rm -rf node_modules bower_components dist tmp – Delete temporary development folders.
- npm install –save-dev ember-cli@2.2.0-beta.3 – Update project’s package.json to use latest version.
- npm install – Reinstall NPM dependencies.
- bower install – Reinstall bower dependencies.
- ember init – This runs 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). The most common source of upgrade pain is missing changes in this step.Setup
When getting to the last step I said Y to all the prompts asking to overwrite files. Your strategy may vary. I also had to reinstall ember-simple-auth as it had disappeared. The same is true for coffeescript.
It also added back an app.js and router.js files. We are using coffescript so these files need to be deleted.
This also overwrote my ember-cli-build.js file where we import font awesome and bootstrap. This needed to change back to the following
Whew! Once all of the things I accidentally deleted were put back in place I have a working app again.