Reputation: 560
I'm having this error with Ionic 3 for any command I launch even ionic -v
Error at FatalException.Exception (/usr/lib/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/errors.js:8:23) at FatalException (/usr/lib/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/errors.js:17:9) at Config. (/usr/lib/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/config.js:60:35) at throw (native) at rejected (/usr/lib/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/config.js:5:65) name: 'Exception', exitCode: 1, fatal: true
I tried uninstalling ionic then reinstalling but the error persisted.
Any help or recommendation would be very much appreciated.
Upvotes: 0
Views: 261
Reputation: 7
delete node_module folder and re-run npm install command , it works .
Upvotes: 0
Reputation: 2116
Possibly try npm prune which removes unnecessary node file relative to you project
If all else fails then rm -rf node_modules then npm install(be careful with this as it clears all npm data)
Upvotes: 0
Reputation: 679
Check the ionic config.json
file, great chance it is empty or corrupt based on this error. To get to the file location do the following.
Open up your terminal and go to your root directory
cd /
Next get to the .ionic
folder.
cd Users/<User>/.ionic
Once here check the config.json
to see its contents. Like I said it is most likely empty or corrupt so go ahead and delete it, then reinstall Ionic and that should fix your issue.
Upvotes: 2