ng has unexpectedly closed (exit code 127).

JavaScript
npm install @ionic/[email protected] --save-dev
// being in root directory of your project
Source

Also in JavaScript: