I initially had nodejs and npm installed as a Snap package.
When I created a new project with Ionic I was getting an error with ionic serve
and just crashing with exit code 1.
I was searching around trying to find the issue.
I ran ionic info
and saw this.
Ionic:
Ionic CLI : 5.0.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v10.16.0 (/snap/node/2212/bin/node)
npm : not installed
OS : Linux 5.0
It says npm is not installed. I know it is installed because I wouldn’t have gotten this far. I switched to the Ubuntu package and it is working fine now.
So it looks like a bug with snap packages.