error ng has unexpectedly closed (exit code 1) code example
Example: ng has unexpectedly closed (exit code 127).
npm install @ionic/app-scripts@latest --save-dev
// being in root directory of your project
npm install @ionic/app-scripts@latest --save-dev
// being in root directory of your project