Ionic4 4.2.1 : Linux can't run "ionic serve" without an error
See original GitHub issueI am struggling in this error when I try the first run on an Ionic4 project. when I try “ionic serve” I’m getting this error:
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 didn’t change anything in the project, just created and tried to run. I tried in Windows and it works like a charm, but I can’t make it run on Linux. I tried other computers and I am getting the same error, what makes me believe there is a bug in ionic cli when running it in linux OR I should make some changes in linux to make it run.
When I run “ionic serve --verbose” I get this error “detail”:
This my Ionic Info:
Ionic:
ionic (Ionic CLI) : 4.2.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.13
@angular-devkit/build-angular : 0.8.5
@angular-devkit/schematics : 0.8.5
@angular/cli : 6.2.5
@ionic/angular-toolkit : 1.0.0
Cordova:
cordova (Cordova CLI) : not installed
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)
System:
NodeJS : v10.12.0 (/snap/node/1149/bin/node)
npm : not installed
OS : Linux 4.15
Although it is saying that npm and Cordova are not installed, they are installed, at least if I run “npm --version” it returns to me with “6.4.1” and cordova “8.1.2 (cordova-lib@8.1.1)”.
Ionic3 projects is running smoothly.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:12 (2 by maintainers)
@davidrock What happens if you run
npx ng serve
?Try this: $ npm install $ npm audit fix