Ionic app script has unexpectedly closed (exit code 0)

F:\Familybook\trunk\FabAppLatest> ionic info
√ Gathering environment info - done!

Ionic:

   ionic (Ionic CLI)  : 4.2.1 (C:\Users\Admin\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : none
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 28 other plugins)

System:

   NodeJS : v8.12.0 (C:\Program Files\nodejs\node.exe)
   npm: 6.4.1
   OS: Windows 10

the above information is about ionic, Cordova and my system information. I’m facing the exit 0 error while CLI serving the app script. I attached my error statement below

F:\Familybook\trunk\FabAppLatest> ionic serve
> ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] [13:13:35]  ionic-app-scripts 3.2.0

[ERROR] ionic-app-scripts has unexpectedly closed (exit code 0).

        The Ionic CLI will exit. Please check any output above for error details.

I’m having the same issue, I’ve tried reinstalling everything from different versions and nothing has worked so far. I even tried installing everything on a fresh computer but still had no luck.

I don’t know if this will help you but I was able to get rid of the error by accessing an old restore point (11th October 2018) and then uninstalling nodejs, removing npm and npm-cache from AppData. Then reinstalling a slightly old version of nodejs (v8.11.4) and reinstalling ionic and cordova with
npm i ionic cordova -g

Hope this helps!