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.
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
- Do not use --omit=dev / --production for the build job; the builder is a devDependency.
- Keep @angular-devkit/build-angular on the same major as @angular/cli.
- Run npm ci so the exact locked versions install.
- run: npm ci
- run: npx ng build --configuration productionUpdate the builder with the CLI
Use ng update to move the CLI and its devkit builder together to a matching major.
ng update @angular/cliHow 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.