Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Data path '''' should NOT have additional properties (es5BrowserSupport)

Trying to get started in Angular, after creating the project in the CLI I tried opening the project using both ng serve -o and npm start but I get the following error:

Schema validation failed with the following errors:
  Data path "" should NOT have additional properties(es5BrowserSupport)

Tried:

  • Recreating the project with similar results
  • Reinstalling the CLI

ErrorLog:

0 info it worked if it ends with ok    1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: C:\ProgramFiles\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\User\Desktop\CCCTool\node_modules\.bin;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\User\AppData\Roaming\npm;C:\Users\User\AppData\Local\Programs\Microsoft VS Code\bin
9 verbose lifecycle [email protected]~start: CWD: C:\Users\User\Desktop\CCCTool
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'ng serve' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `ng serve`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program 
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\User\Desktop\CCCTool
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.15.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `ng serve`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
like image 953
Frostytude Avatar asked Jan 21 '19 11:01

Frostytude


5 Answers

es5BrowserSupport add additional polyfill

Solution 1

For option es5BrowserSupport your @angular/cli required minimum version 7.3 and @angular-devkit/build-angular required minimum version 0.13 .

  1. Check your @angular/cli version. if is less than 7.3 then run following command

    ng update @angular/cli

  2. Check your @angular-devkit/build-angular version. if is less than 0.13 then run following command

    ng update @angular-devkit/build-angular

Solution 2

Also you can edit angular.json file and find "es5BrowserSupport": true and comment it. It will also work without updating dependency

like image 170
Bhagwat Tupe Avatar answered Nov 02 '22 14:11

Bhagwat Tupe


Install @angular/[email protected] and @angular-devkit/[email protected] to support es5BrowserSupport option in angular.json

like image 36
Rakhat Avatar answered Nov 02 '22 15:11

Rakhat


I ran into the same issue after adding a new application to an existing workspace. After some research, I realized that what the error was trying to tell me is that I had an unsupported option in my angular.json, in this instance, the 'es5BrowserSupport' option. After doing a search through my angular.json, and removing the 'es5BroswerSupport' option from the applications architect/Build/options section, I was able to build and serve the application.
I have Angular 7.2.3 with cli 7.3.

like image 17
Craig H Avatar answered Nov 02 '22 13:11

Craig H


I received this error after manually adding a new application in angular.json. The application configurations need to be inside the "projects". This error occurred when I added new application outside of the enclosing bracket of projects.

like image 2
Atif Majeed Avatar answered Nov 02 '22 13:11

Atif Majeed


before updating delete package-lock.json and delete node_modules

then fix it by updating

"@angular-devkit/build-angular": "~0.802.2" 

My angular Version : 8

My Ionic Version : 4

i hope help you !

like image 1
Jovany Mezura Avatar answered Nov 02 '22 13:11

Jovany Mezura