How to fix “Schema Validation error” when building an angular app

Asked
Active3 hr before
Viewed126 times

6 Answers

schemavalidationerrorangular
90%

has something changed since that version or angular? ,These are chat archives for angular/angular,When I get an error response from a REST call (400 response code), it is not being caught and passed to my handleError function when I do this (Angular 6,1

Example_snippet/controller/utility/_schema.js/ The program 'ng' is currently . . .
The program 'ng'
is currently not installed.You can install it by typing:
   apt install ng - common
load more v
88%

I posted a fix to a similar schema validation error in #14338,Based on these two answers on StackOverflow also related to schema validation errors :,Same error, Fixed by change schematics in angular

Example_snippet/controller/utility/_schema.js/ - [x] bug report -> please sea. . .
-[x] bug report - > please search issues before submitting -
   [] feature request
load more v
72%

I posted a fix to a similar schema validation error in #14338,Updated package,json from "@angular-devkit/build-angular": "^0

Example_snippet/controller/utility/_schema.js/ - [x] bug report -> please sea. . .
-[x] bug report - > please search issues before submitting -
   [] feature request
Step 2 continued with - [ ] devkit - [x] schematics . . .
-[] devkit
   -
   [x] schematics
Step 3 continued with Angular CLI: 6.0.8 Node: 8.11.. . .
Angular CLI: 6.0 .8
Node: 8.11 .2
OS: win32 x64
Angular: 6.0 .7
   ...animations, common, compiler, compiler - cli, core, forms
   ...http, language - service, platform - browser
   ...platform - browser - dynamic, router

Package Version
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
@angular - devkit / architect 0.6 .8
@angular - devkit / build - angular 0.6 .8
@angular - devkit / build - optimizer 0.6 .8
@angular - devkit / core 0.6 .8
@angular - devkit / schematics 0.6 .8
@angular / cli 6.0 .8
@ngtools / webpack 6.0 .8
@schematics / angular 0.6 .8
@schematics / update 0.6 .8
rxjs 6.2 .1
typescript 2.7 .2
webpack 4.8 .3
Step 4 continued with "build": { "builder": ". . .
"build": {
   "builder": "@angular-devkit/build-angular:browser",
   "options": {
      "invalid": "value",
      ...
   }
}
Step 5 continued with Schema validation failed with . . .
Schema validation failed with the following errors:
   Data path ""
should NOT have additional properties(invalid).
Step 6 continued with Schema validation failed with . . .
Schema validation failed with the following errors:
   Data path "path/to/invalid/option"
should NOT have additional properties(invalid).
load more v
65%

i am currently on angular 7,1 and whenever i run ng build to build the project,i get a schema validation error

Example_snippet/controller/utility/_schema.js/ "@angular-devkit/build-angular. . .
"@angular-devkit/build-angular": "^0.800.1"
Step 2 continued with "@angular-devkit/build-angular. . .
"@angular-devkit/build-angular": "^0.12.4"
load more v
75%

Попробуйте обновить файл package,json так, чтобы "@angular-devkit/build-angular": "^0

Example_snippet/controller/utility/_validation.js/ Data path ".builders['app-sh. . .
  Data path ".builders['app-shell']"
  should have required property 'class'.
  Error: Schema validation failed with the following errors:
     Data path ".builders['app-shell']"
  should have required property 'class'.
  at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult[as project] F: \sageProjects\ myriad - app\ node_modules\ @angular - devkit\ core\ src\ workspace\ workspace.js: 215: 42)
  at MergeMapSubscriber._tryNext F: \sageProjects\ myriad - app\ node_modules\ rxjs\ internal\ operators\ mergeMap.js: 69: 27)
  at MergeMapSubscriber._next F: \sageProjects\ myriad - app\ node_modules\ rxjs\ internal\ operators\ mergeMap.js: 59: 18)
  at MergeMapSubscriber.Subscriber.next F: \sageProjects\ myriad - app\ node_modules\ rxjs\ internal\ Subscriber.js: 67: 18)
  at MergeMapSubscriber.notifyNext F: \sageProjects\ myriad - app\ node_modules\ rxjs\ internal\ operators\ mergeMap.js: 92: 26)
  at InnerSubscriber._next F: \sageProjects\ myriad - app\ node_modules\ rxjs\ internal\ InnerSubscriber.js: 28: 21)
  at InnerSubscriber.Subscriber.next F: \sageProjects\ myriad - app\ node_modules\ rxjs\ internal\ Subscriber.js: 67: 18)
  at MapSubscriber._next(F: \sageProjects\ myriad - app\ node ** strong text ** _modules\ rxjs\ internal\ operators\ map.js: 55: 26)
  at MapSubscriber.Subscriber.next(F: \sageProjects\ myriad - app\ node_modules\ rxjs\ internal\ Subscriber.js: 67: 18)
  at SwitchMapSubscriber.notifyNext(F: \sageProjects\ myriad - app\ node_modules\ rxjs\ internal\ operators\ switchMap.js: 86: 26)
40%

If you have a problem with a specific lint rule, please back out and select the @angular-eslint/eslint-plugin or @angular-eslint/eslint-plugin-template issue template, depending on where the rule lives, -->,<!-- ^ Before submitting the issue please check that output from ng version carefully

Example_snippet/controller/utility/_validation.js/ # Please run `npx ng version` . . .
# Please run `npx ng version` in your project and paste the full output here:
   Angular CLI: 12.0 .2
Node: 14.17 .0
Package Manager: npm 6.14 .13
OS: linux x64

Angular: 12.0 .2
   ...animations, cli, common, compiler, compiler - cli, core, forms
   ...platform - browser, platform - browser - dynamic, router

Package Version
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
@angular - devkit / architect 0.1200 .2
@angular - devkit / build - angular 12.0 .2
@angular - devkit / core 12.0 .2
@angular - devkit / schematics 12.0 .2
@schematics / angular 12.0 .2
rxjs 6.6 .7
typescript 4.2 .4