Pavan Jadda
Pavan Jadda

Reputation: 4871

Schema validation failed with error optimization.styles should be boolean

I updated angular.json with the following config to enable inlineCritical CSS


"optimization": { 
  "scripts": true,
  "styles": {
    "minify": true,
    "inlineCritical": true
  },
  "fonts": true
}

When I try to build the project I get the following error

Error

and here is my ng config


Angular CLI: 11.1.4
Node: 14.15.5
OS: darwin x64

Angular: 11.2.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, localize, material, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.7
@angular-devkit/build-angular   0.1100.7
@angular-devkit/core            11.0.7
@angular-devkit/schematics      11.1.4
@angular/cli                    11.1.4
@schematics/angular             11.1.4
@schematics/update              0.1101.4
rxjs                            6.6.3
typescript                      4.1.5


Upvotes: 1

Views: 1125

Answers (1)

Pavan Jadda
Pavan Jadda

Reputation: 4871

Okay, based on this answer @angular-devkit/build-angular 0.1100.7 is outdated. Updating it manually fixed the issue. Not sure why npm update din't update it

Upvotes: 1

Related Questions