error ng has unexpectedly closed (exit code 127). ionic 4 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