Ionic exception when running any ionic command, how to?

Viewed 199

I'm getting this error when i run a ionic command ionic ...:

{ Error
    at FatalException.Exception (C:\Users\crist\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\errors.js:8:23)
    at FatalException (C:\Users\crist\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\errors.js:17:9)
    at Config.<anonymous> (C:\Users\crist\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\config.js:45:35)
    at throw (native)
    at rejected (C:\Users\crist\AppData\Roaming\npm\node_modules\ionic\node_modules\tslib\tslib.js:94:69) name: 'Exception', exitCode: 1, fatal: true }

I tried removing ionic and cordova, clearing cache and re-installing it, globally and in project, but still same error

any ideas?

4 Answers

Looks like ~/.ionic/config.json was corrupt. I removed the ~/.ionic directory and reinstall it. Seems fine now.

Had the same problem. Removing .ionic folder and reinstalling did resolve the error.

Remove the .ionic folder then run the ionic command in the cli again

from root on mac,for "jenkins" user chown -R jenkins ~/.npm/ and chown -R jenkins ~/.config/

and check ionic version by: ionic -v 3.20.0 fixed this!!

Related