If you have faced or are facing the below error while running your angular application, then this post is for you.
Schema validation failed with the following errors: Data path “” should NOT have additional properties(es5BrowserSupport)
There are two ways to remove this error, choose any of the below as per the requirement.
1. Remove es5BrowserSupport option from application
Find angular.json file in your project and search for
es5BrowserSupport. Comment this line as shown in the image below.
Restart the application using command
This approach is not recommended if you want your application to support older browsers.
If you want
es5BrowserSupportin your application, then the minimum version for
@angular/clishould be 7.3 and
@angular-devkit/build-angularshould be 0.13.
So, modify the version of these dependencies in the package.json file of your application. After these modifications,
run npm installto install the updates and
run ng serveto start the application.
Further, if you do not want to edit package.json file, then update
@angular/cliusing below command,
ng update @angular/cli
@angular-devkit/build-angular using below command
ng update @angular-devkit/build-angular