Angular "Schema validation failed" for angular.json in CI
The Angular CLI validates angular.json against the builder's schema before running. An unknown or wrongly typed option fails validation, so the command aborts before any build or test starts.
What this error means
ng build or ng test stops with "Schema validation failed with the following errors:" and a JSON pointer to the offending option in angular.json.
ng
An unhandled exception occurred: Schema validation failed with the following errors:
Data path "/options" must NOT have additional properties(extractCss).Common causes
An option removed or renamed by a CLI version
An option valid in an older CLI (such as extractCss) was removed in a newer major, so the schema rejects it.
A wrongly typed or misplaced option
An option set to the wrong type, or placed under the wrong target, does not match the builder schema.
How to fix it
Remove or correct the option
- Read the JSON pointer in the error (for example
/options). - Delete the removed option or fix its type/location in
angular.json. - Re-run the command.
angular.json
// remove the unsupported option flagged by the schema, e.g. "extractCss"Run ng update to migrate config
The official update migrations rewrite angular.json for the new major, removing options the schema no longer allows.
Terminal
npx ng update @angular/cli @angular/coreHow to prevent it
- Use
ng updatemigrations when bumping majors so config stays valid. - Validate
angular.jsonchanges against the builder schema. - Keep CLI and project config on the same major.
Related guides
Angular "This version of CLI is only compatible with Angular versions" in CIFix Angular "This version of CLI is only compatible with Angular versions X" in CI - the installed @angular/c…
Angular "Cannot find module '@angular-devkit/build-angular'" in CIFix Angular "Cannot find module '@angular-devkit/build-angular'" in CI - the builder package referenced by an…
Angular "ngcc failed to process" View Engine library in CIFix Angular "ngcc failed to process" in CI - the Angular compatibility compiler could not convert a View Engi…