Data path .builders['app-shell'] should have required property 'class'.

Dung Do Tien Dec 24 2020 145

Hello, I have a project angular 7. When I get it from git hub and run code with ng ser -o command I got an error Data path .builders['app-shell'] should have required property 'class'

Schema validation failed with the following errors:
  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.project (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42)
    at MergeMapSubscriber._tryNext (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
    at MergeMapSubscriber._next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MergeMapSubscriber.notifyNext (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
    at InnerSubscriber._next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MapSubscriber._next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\map.js:55:26)
    at MapSubscriber.Subscriber.next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at SwitchMapSubscriber.notifyNext (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\switchMap.js:86:26)
    at InnerSubscriber._next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\util\subscribeTo.js:17:28
    at Object.subscribeToResult (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)
    at SwitchMapSubscriber._innerSub (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\switchMap.js:65:54)
    at SwitchMapSubscriber._next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\switchMap.js:55:14)
    at SwitchMapSubscriber.Subscriber.next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at SwitchMapSubscriber.notifyNext (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\switchMap.js:86:26)
    at InnerSubscriber._next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\util\subscribeTo.js:17:28
    at Object.subscribeToResult (E:\admin_angular\DVG.APA.CMSClient\node_modules\@angular-devkit\core\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)

I tried to run npm install and ng update commands but it still errors.

Below is my project information:

Angular CLI: 7.3.6
Node: 12.18.4
OS: win32 x64
Angular: 7.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.6
@angular-devkit/build-angular     0.1100.5
@angular-devkit/build-optimizer   0.13.10
@angular-devkit/build-webpack     0.13.10
@angular-devkit/core              7.3.6
@angular-devkit/schematics        7.3.6
@angular/cdk                      7.3.3
@angular/cli                      7.3.6
@angular/material                 7.3.3
@ngtools/webpack                  7.3.10
@schematics/angular               7.3.6
@schematics/update                0.13.6
rxjs                              6.4.0
typescript                        3.2.4
webpack                           4.29.0

 

Have 1 answer(s) found.
  • Hello, 

    This error throws when angular-devkit/build-angular package not maps version.

    Your current angular-devkit/build-angular package is version ^0.1100.5 you can update it to version ~0.13.9, It will working for you. To update the version you can open package.json and fine angular-devkit/build-angular and change the version of it. And then you can run npm install command to re-update the package version. 

    You can find another version from https://www.npmjs.com/package/@angular-devkit/build-angular

    Sandeep Kumar Dec 24 2020
Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips