ng has unexpectedly closed (exit code 0). 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