Ionic-cli: Error at FatalException.Exception

Created on 23 May 2017  路  12Comments  路  Source: ionic-team/ionic-cli

I already opened this issue on #2333
but someone offer me solution and closed it even the solution did not work ..

so again:
I downloaded Ionic 3 few days ago and everything worked just fine when all of the sudden yesterday this error showed up after every ionic command I tried to use inside and outside my project dir (ionic info, ionic serve, ionic start etc.):

{ Error at FatalException.Exception (C:\Users\X\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\dist\lib\errors.js:8:23) at FatalException (C:\Users\X\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\dist\lib\errors.js:17:9) at Config. (C:\Users\X\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\dist\lib\config.js:41:31) at throw (native) at rejected (C:\Users\X\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\dist\lib\config.js:5:65) name: 'Exception', exitCode: 1, fatal: true }
I have tried to delete ionic and cordova and reinstall many times using many different instructions I found online:

npm uninstall -g cordova ionic
npm cache clean -f
npm install npm -g
npm uninstall node
apt-get purge npm
apt-get install npm
npm install node -g
npm install -g ionic cordova

I made sure they were really installed and uninstalled via npm -g list --depth=0

I've also tried to delete and reinstall node (following this instructions) but this error stay with every version of ionic 3.X I tried.
ionic 2 on the other hand work great. any Idea what might have caused that and how to fix it?

I'm using:

Windows 10
npm : 4.6.1
node: v6.10.3
cordova: 7.0.1

version of ionic 3 I tried:
3.0.0
3.1.0
3.1.1
3.1.2
3.2.0

and I also ran :
npm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest @ionic/cli-plugin-cordova@latest

I really need your help because no one online seems to know the solution to the problem and the ionic support redirected me to u
thanks ahead

bug

Most helpful comment

I had the same issue yesterday. There is a file under 'C:\Users*USER*.ionic' called 'config.json' which was empty. I got one of my colleagues to send me his copy of it and used that one, it now seems to be working fine.

All 12 comments

I had the same issue yesterday. There is a file under 'C:\Users*USER*.ionic' called 'config.json' which was empty. I got one of my colleagues to send me his copy of it and used that one, it now seems to be working fine.

thanks a lot ! what worked for me is deleting the 'C:\UsersUSER.ionic folder then delete reinstall ionic cordova :)

Thanks for the insight, @kaiukdevelopment !

I'll handle this case going forward. I'm not sure how the config file was emptied for you both, though???

I had the same issue today, I just removed the config.json file having all entries as null from C:\UsersUSER.ionic folder. All is working fine now.

Im having this issue on a mac can anyone help with this ?

thanks a lot !

Anyone getting this issue should update their CLI to the latest. npm i -g ionic

I gone through same issue. I just removed config.json file from C:\Users\UserName.ionic . Now it's working fine!!

I had same issue. Delete the config.json in the C:\Users{Username}.ionic folder worked for me.

But does anyone know why the file went empty or corrupted in the first place.

By rm ~/.ionic/config.json fixed the issue on Mac. Thanks guys

As others have said deleting the config.json file does the trick. For me this happened after my laptop died while running ionic serve. Seems the config.json file get's corrupted if that happens.

I also copied 'C:\UsersUSER.ionic' called 'config.json' from another computer and it worked. I had the app open, and windows crashed for no apparent reason. It wasn't from a new install.

Was this page helpful?
0 / 5 - 0 ratings