Skip to content
Latchkey

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

  1. Read the JSON pointer in the error (for example /options).
  2. Delete the removed option or fix its type/location in angular.json.
  3. 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/core

How to prevent it

  • Use ng update migrations when bumping majors so config stays valid.
  • Validate angular.json changes against the builder schema.
  • Keep CLI and project config on the same major.

Related guides

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