ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Error at FatalException.Exception

Open Hadard753 opened this issue 9 years ago • 12 comments

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

Hadard753 avatar May 23 '17 05:05 Hadard753

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.

kaiukdevelopment avatar May 23 '17 08:05 kaiukdevelopment

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

Hadard753 avatar May 23 '17 10:05 Hadard753

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???

imhoffd avatar May 23 '17 17:05 imhoffd

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.

nitinpund avatar May 25 '17 06:05 nitinpund

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

allenmabraham avatar Aug 21 '17 14:08 allenmabraham

thanks a lot !

xiaosan666 avatar Aug 29 '17 04:08 xiaosan666

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

imhoffd avatar Aug 29 '17 21:08 imhoffd

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

ramukodandapuram avatar Aug 30 '17 12:08 ramukodandapuram

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.

babatundeodaniel avatar Sep 04 '17 11:09 babatundeodaniel

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

pougin avatar Oct 25 '17 03:10 pougin

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.

linjmeyer avatar Nov 17 '17 10:11 linjmeyer

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.

mcs4uweb avatar Feb 07 '18 22:02 mcs4uweb