npm install @ionic/app-scripts@latest --save-dev // being in root directory of your project
npm install @ionic/app-scripts@latest --save-dev
This error might occur if you installed node.js via the snapstore !!!