BUG! Running ionic command on console i get Unexpected token A in JSON at position 0

Hi, i am just beginning using ionic,

But i just installed the latest version of ionic through npm running the command 'npm install -g cordova ionic
Afterwards i am running the command… ‘ionic start myApp tabs

but i receive the following error 'Unexpected token A in JSON at position 0
even when i type plain ionic.

What could be the problem?

Thanks in advance

Found it… probably its a BUG of ionic that a file gets corrupted! If i delete the config.json file located at: C:\Users\(theuser).ionic\ it works fine… after a while it gets corrupted again and i have to redelete the file!

Files don’t corrupt by itself - and thousands of users are using the current CLI. It’s probably someting on your machine messing with that file.

If you sure it is a BUG!, as you said multiple times, please report an issue at https://github.com/ionic-team/ionic-cli/issues

I understand what you are saying,

But i was trying to make a clean installation of ionic for 2 days straight with no solution to my problem and no external software involved!! I’ve being having a headache until i found a solution. So in what way could the machine have a role on this. Corrupting the specific file by itself? I does not make sense.

I have seen many users having same problems and i posted the above answer in order to help. I will try to find a way to reproduce it in order to find the reason behind this.

Its easy to ignore a problem but harder finding a solution for it…

Virus scanner, strange corporate “security” software, Malware on your computer - just some of the possibilities.

I (and many others) are using Ionic CLI on Windows (you didn’t even mention that you use Windows, but C:\Users\... seems like it) and have no problem. Also I have a pretty good overview of the problems from watching the forum here and the CLI issues, so I am sure this is not a widespread problem.

Post your ionic info output please so we know at least which versions could be affected.

Here is the ionic info output… thank you.

global packages:

@ionic/cli-utils : 1.4.0
Ionic CLI        : 3.4.0

System:

Node       : v6.10.3
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

3.10.10 : Active code page: 1252