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)
Solution
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 ng serve
.
This approach is not recommended if you want your application to support older browsers.
2. Upgrade versions to support es5BrowserSupport
If you want es5BrowserSupport
in your application, then the minimum version for @angular/cli
should be 7.3 and @angular-devkit/build-angular
should be 0.13.
So, modify the version of these dependencies in the package.json file of your application. After these modifications, run npm install
to install the updates and run ng serve
to start the application.
Further, if you do not want to edit package.json file, then update @angular/cli
using below command,
ng update @angular/cli
and update @angular-devkit/build-angular
using below command
ng update @angular-devkit/build-angular
Hit the clap below if any of the above solutions worked for you.