Ember CLI Project Updater
Ember CLI Update is a command-line tool designed to help developers update their Ember.js application and addon boilerplate code to newer versions. It differentiates itself significantly from the default `ember init` command by applying a granular diff of changes between blueprint versions, thereby preserving existing user modifications and additions, rather than resetting the project to a clean slate. The tool supports updating official Ember CLI blueprints (e.g., `app`, `addon`, `glimmer`) as well as custom addon blueprints. The current stable version is 3.0.1, released on 2025-10-07. While there isn't a fixed release cadence, updates typically align with major Ember CLI blueprint changes and address bug fixes. Key differentiators include its non-destructive diffing approach, the ability to target specific Ember CLI versions for updates, and integrated support for automatically running applicable codemods to assist with broader code migrations.
Common errors
-
Error: You must commit your package.json before running ember update
cause The `ember update` command (when installed locally) expects the `package.json` changes from its own installation to be committed before proceeding.fixAfter running `ember install ember-cli-update`, use `git add package.json package-lock.json && git commit -m "Install ember-cli-update"` (or similar for other lockfiles) before executing `ember update`. -
Conflicts detected, please resolve them and commit the result
cause The update process found differences between your project's files and the new blueprint version that Git could not automatically merge.fixManually open the conflicting files (marked by Git with `<<<<<<<`, `=======`, `>>>>>>>`), resolve the differences, save the files, then `git add` the resolved files and `git commit` your changes. Alternatively, run `ember-cli-update --resolve-conflicts` to launch your configured Git merge tool. -
Cannot read property 'name' of undefined (or similar error related to projectName)
cause This can occur in older versions of `ember-cli-update` if the `name` field is missing from your project's `package.json` file.fixEnsure that your `package.json` includes a `"name": "your-project-name"` field. This bug was fixed in `v2.0.1`, so upgrading `ember-cli-update` to `v2.0.1` or newer will also resolve it.
Warnings
- breaking Version 3.0.0 of ember-cli-update dropped support for Node.js versions older than 20.
- breaking Version 2.0.0 removed the deprecated ability to run as an `ember addon` command.
- gotcha Upgrading Ember CLI projects past version 6.7.0 with `ember-cli-update` might not automatically handle the transition to Vite-based builds.
- gotcha Your Git working directory must be clean before running `ember-cli-update` or `ember update`.
- gotcha When installing `ember-cli-update` as a local addon (`ember install ember-cli-update`), you must commit the `package.json` changes *before* running `ember update`.
- gotcha Merge conflicts are common during updates, especially in projects with custom modifications.
- gotcha Running codemods (`--run-codemods`) should typically be done after the initial boilerplate update and *after* all merge conflicts have been resolved.
Install
-
npm install ember-cli-update -
yarn add ember-cli-update -
pnpm add ember-cli-update
Imports
- Global CLI Invocation
npm install -g ember-cli-update ember-cli-update
pnpm add -g ember-cli-update ember-cli-update
- Local Ember CLI Command Invocation
ember update
ember install ember-cli-update # Commit package.json changes FIRST git add package.json package-lock.json || yarn.lock || pnpm-lock.yaml git commit -m "Install ember-cli-update" ember update
- Running Codemods
ember-cli-update --run-codemods # before resolving conflicts
ember-cli-update --run-codemods
Quickstart
git init pnpm init -y pnpm add -D ember-cli@latest ember-cli-update npx ember new my-ember-app --skip-npm --skip-git cd my-ember-app git add . git commit -m "Initial Ember app" # Simulate some changes (e.g., in app.js) echo "// Custom comment" >> app/app.js # Update to the latest version (assuming a new version is available) ember update # If merge conflicts arise, resolve them manually or use a merge tool # For example, if app.js has conflicts, you'd edit it then: # git add app/app.js # git commit -m "Resolve conflicts after update" # Then, run codemods if any are applicable for the version jump ember update --run-codemods # Verify the update npx ember s