ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

"ionic serve" command does not work in Windows environment

Open festusmwambu opened this issue 3 years ago • 0 comments

  • I am having an error running the simple command of ionic serve natively in Windows using Git Bash. This is the error I get:

$ ionic serve

ng.cmd run app:serve --host=localhost --port=8100 [ng] Error: Schema validation failed with the following errors: [ng] Data path "" must NOT have additional properties(es5BrowserSupport).

[ERROR] ng has unexpectedly closed (exit code 1).

    The Ionic CLI will exit. Please check any output above for error details.
  • This is the solution that I found and I thought it was good to share: On angular.json file if you have an empty "scripts": [] and "es5BrowserSupport": true , just remove it ! and then run ionic serve
 "build": {
      "options": {
       ...,
        "scripts": [],                <-- Remove this line
        "es5BrowserSupport": true     <-- Remove this line
       ...

festusmwambu avatar Jul 04 '22 12:07 festusmwambu