简体   繁体   中英

Error: Schema validation failed with the following errors: Data path ".builders['app-shell']" should have required property 'class'

I'm new to angular and I have recently cloned a project from GitHub and when I tried to run it using "ng serve". It is showing me an error as below.

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._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\Users\dell\hotel-panel-av7\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42)
    at MergeMapSubscriber._tryNext (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
    at MergeMapSubscriber._next (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MergeMapSubscriber.notifyNext (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
    at InnerSubscriber._next (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MapSubscriber._next (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\operators\map.js:55:26)
    at MapSubscriber.Subscriber.next (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\Subscriber.js:67:18)
    at SwitchMapSubscriber.notifyNext (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\operators\switchMap.js:86:26)
    at InnerSubscriber._next (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\Subscriber.js:67:18)
    at C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\util\subscribeTo.js:17:28
    at Object.subscribeToResult (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)
    at SwitchMapSubscriber._innerSub (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\operators\switchMap.js:65:54)
    at SwitchMapSubscriber._next (C:\Users\dell\hotel-panel-av7\node_modules\rxjs\internal\operators\switchMap.js:55:14)

The information about my current angular.

Angular CLI: 7.3.1 Node: 10.16.3 OS: win32 x64 Angular: 7.2.15 ... animations, common, compiler, core, forms, http ... platform-browser, platform-browser-dynamic, platform-server ... router, service-worker

Package Version ----------------------------------------------------------- @angular-devkit/architect 0.803.0 @angular-devkit/build-angular 0.803.0 @angular-devkit/build-optimizer 0.803.0 @angular-devkit/build-webpack 0.803.0 @angular-devkit/core 7.3.1 @angular-devkit/schematics 0.0.40 @angular/cdk 7.3.7 @angular/cli 7.3.1 @angular/compiler-cli 7.2.4 @angular/language-service 7.2.4 @angular/material 7.3.7 @angular/pwa 0.12.4 @ngtools/json-schema 1.1.0 @ngtools/webpack 8.3.0 @schematics/angular 7.2.4 @schematics/schematics 0.0.10 @schematics/update 0.13.1 rxjs 6.3.3 typescript 3.1.6 webpack 4.39.2

My Package.json

        {
          "name": "AboutStaysHotelPanel",
          "version": "1.0.0",
          "scripts": {
            "ng": "ng",
            "start": "ng serve",
            "build": "ng build",
            "test": "ng test",
            "lint": "ng lint",
            "e2e": "ng e2e"
          },
          "private": true,
          "dependencies": {
            "@angular-devkit/schematics": "0.0.40",
            "@angular/animations": "^7.2.4",
            "@angular/cdk": "^7.3.2",
            "@angular/common": "^7.2.4",
            "@angular/compiler": "^7.2.4",
            "@angular/core": "^7.2.4",
            "@angular/forms": "^7.2.4",
            "@angular/http": "^7.2.4",
            "@angular/material": "^7.3.2",
            "@angular/platform-browser": "^7.2.4",
            "@angular/platform-browser-dynamic": "^7.2.4",
            "@angular/platform-server": "^7.2.1",
            "@angular/pwa": "^0.12.4",
            "@angular/router": "^7.2.1",
            "@angular/service-worker": "^7.2.4",
            "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.5",
            "@types/moment": "^2.13.0",
            "@types/socket.io-client": "^1.4.32",
            "amazing-time-picker": "^1.5.3",
            "angular-draggable-droppable": "^1.1.1",
            "class-transformer": "^0.1.9",
            "core-js": "^2.5.7",
            "fs-extra": "^4.0.3",
            "hammerjs": "^2.0.8",
            "http-status-codes": "^1.3.0",
            "moment": "^2.24.0",
            "ng-pick-datetime": "^7.0.0",
            "rxjs": "~6.3.3",
            "rxjs-compat": "^6.4.0",
            "socket.io-client": "^2.1.1",
            "tslib": "^1.9.0",
            "web-animations-js": "^2.3.1",
            "zone.js": "~0.8.26"
          },
          "devDependencies": {
            "@angular-devkit/build-angular": "^0.803.0",
            "@angular-devkit/core": "^7.3.1",
            "@angular/cli": "^7.2.4",
            "@angular/compiler-cli": "^7.2.4",
            "@angular/language-service": "^7.2.4",
            "@types/jasmine": "~3.3.8",
            "@types/jasminewd2": "~2.0.3",
            "@types/node": "^10.12.26",
            "codelyzer": "~4.5.0",
            "jasmine-core": "~3.3.0",
            "jasmine-spec-reporter": "~4.2.1",
            "karma": "^4.3.0",
            "karma-chrome-launcher": "~2.2.0",
            "karma-coverage-istanbul-reporter": "~2.0.1",
            "karma-jasmine": "~2.0.1",
            "karma-jasmine-html-reporter": "^1.4.0",
            "protractor": "~5.4.0",
            "ts-node": "~8.0.2",
            "tslint": "~5.12.1",
            "typescript": "3.1.6"
          }
        }

Changing from

"@angular-devkit/build-angular": "^0.803.0",

to

"@angular-devkit/build-angular": "^0.13.9",

will solve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM