Reputation: 31
i am currently on angular 7.1 and whenever i run ng build to build the project,i get a schema validation error. Please i need help
running ng serve works perfectly without any problem
below is the error log
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)
Upvotes: 0
Views: 5804
Reputation: 434
Try update the package.json file so that "@angular-devkit/build-angular": "^0.800.1"
reads "@angular-devkit/build-angular": "^0.12.4"
Then run npm install
in the command line.
Upvotes: 2
Reputation: 31
Thankfully i resolved it by doing the following:
ng update @angular/cli @angular/core
npm install
if you encounter an error as i did, you will be prompted to run npm audit fix
ng build
which worked with no errors/.
NB:i executed all commands with windows powershell as an administrator
Upvotes: 0