I am struggling in this error when I try the first run on an Ionic4 project.
ng run app:serve --host=0.0.0.0 --port=8100
[ERROR] ng has unexpectedly closed (exit code 1).
The Ionic CLI will exit. Please check any output above for error details.
I'm using Linux Elementary OS (a nice distro that came from Ubuntu).
I tried to run a ionic3 project and it ran successfully.
When I run ionic serve --verbose I get this message
I already tried many things, "npm cache clean", reinstall node, reinstall ionic, start/stop nodejs process. But without any success. As I am not finding anyone with the exactly same problem as mine I am asking you guys.
Re-install below package...
npm install @ionic/app-scripts@latest --save-dev
And just change PATHEXT if there is space or ; at last then remove it
1: open your project root folder
2: delete node_modules folder
3: run npm install
This solution worked... i hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With