File_invalid_json

I’m facing problem when running any commands in cmd prompt

FILE_INVALID_JSON error is occurring…please give me solution

for ex. ionic start MyApp blank --v2 --ts

Would be nice if we could see the entire error :wink:

E:\Shivani\ionic2\SmallIonics2\latLong>ionic cordova platform update android
FILE_INVALID_JSON

E:\Shivani\ionic2\SmallIonics2\latLong>

Oh, fair enough. Odd. I’d try removing the platform and reinstalling it :slight_smile:

Edit: I can’t read, you said all commands, sorry

I tried everything but in my root project…any ionic command is not working :disappointed::disappointed::disappointed:

What is your ionic info output?

when I run ionic info that time same error is occurring…I tried your solution and reinstall ionic@2.2.3 insted of ionic@beta…but I want to work with ionic 2 or 3 only…So please help me for this

What does npm list -g --depth=0 output?
Do you get the error everwhere or only in the project directory?

This might help

I solved my problem. Reinstall ionic and cordova…and install latest version of ionic@3.6.0…before it I deleted .ionic and .cordova folders from c:/user/user and solved it…Thanks @arnoldparge , @Sujan12 , @mich356c for help me

1 Like

I got error everywhere

Kind of ridiculous that for every error we just need to remove and reinstall the whole platform (including cordova) all the time. Something isn’t right with this stuff, or it’s just all over-engineered and overly complicated and hence fragile.

Reminds me of “if you have a problem with your Windows, just reboot”. When developing with Nodejs or React or something like that I never hear this kind of thing, it’s just more stable, apparently.

Cordova is a lot older as these two platforms…
But as always with open source software, which Cordova also is: Feel free to contribute :wink:

And re this actual problem: reinstalling everything is often the way people choose to go instead of finishing investigating the actual problem (similar to nuking node_modules and running npm install with node by the way). There it could have been any of those software packages, but also the content of .ionic and .cordova. We will never know.

1 Like

I’m not criticizing, all these open source products are great and we should be thankful for them.

It’s just that I notice that with mobile/hybrid it seems to be a lot more work to keep stuff working with all these “moving parts”, compared to backend or web.

Recently I spent a whole day getting my Ionic project working again after noticing that it was broken after some unknown dependency got updated (I ended up switching to “cordova prepare”) … you need to have very good and thorough processes in place to manage it properly.

It’s one of the reasons that I backed away from mobile dev, I’m not doing mobile apps anymore recently, it’s just too much work for too little money (I’m targeting good old Java Enterprise dev now and some React work, haven’t even bothered to upgrade my Ionic knowledge to version 2).