Skip to content
Latchkey

Angular "@angular-devkit/build-angular" not found or incompatible in CI

@angular-devkit/build-angular provides the browser and karma builders ng invokes. If it is missing or a different major than @angular/cli, the CLI cannot locate or run the builder and the build fails immediately.

What this error means

ng build fails with "Could not find the '@angular-devkit/build-angular:browser' builder's node package" or a version incompatibility error naming @angular-devkit/build-angular.

ng build
An unhandled exception occurred: Could not find the '@angular-devkit/build-angular:browser'
builder's node package.

Common causes

The devkit package is not installed

It is a devDependency; if CI installed with --omit=dev or the lockfile lacks it, the builder package is absent.

devkit major differs from the CLI major

@angular-devkit/build-angular must match the @angular/cli major; a drift makes the CLI unable to load the builder.

How to fix it

Install dev dependencies and align majors

  1. Do not use --omit=dev / --production for the build job; the builder is a devDependency.
  2. Keep @angular-devkit/build-angular on the same major as @angular/cli.
  3. Run npm ci so the exact locked versions install.
.github/workflows/ci.yml
- run: npm ci
- run: npx ng build --configuration production

Update the builder with the CLI

Use ng update to move the CLI and its devkit builder together to a matching major.

Terminal
ng update @angular/cli

How to prevent it

  • Install dev dependencies in the build job.
  • Keep the CLI and @angular-devkit/build-angular on the same major.
  • Use npm ci for reproducible builder versions.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →