Reputation: 2639
Every time I run this command: ionic cordova build android --release
I am using cordova -v 7.0.1
I get this error:
The config file (.\ionic.config.json) is not valid JSON format.
Please fix any JSON errors in the file.
Here is my file:
{
"app_id": "12345",
"name": "myApp",
"type": "ionic1"
}
I'm not sure what's going on here.
This command works fine: cordova build android --release
I am not sure what's going on with ionic.
Upvotes: 6
Views: 6864
Reputation: 1
just open the config.json file on your ide, delete all the content and ionic serve
Upvotes: 0
Reputation: 2726
Goto this path- C:/Users/{your_username}/.ionic
find file ionic.config
and delete it.
It will be auto-regenerated by the CLI.
Upvotes: 14
Reputation: 3457
Run:
npm uninstall -g ionic
Remove .ionic from user home folder
rm -Rf ~/.ionic
Then, reinstall ionic:
npm i -g ionic
Upvotes: 0
Reputation: 2639
It wasn't my ionic config file after all. It was a package.json and bower.json files. They did not have the dependencies correctly in place and the app name was in uppercase. After I fixed my dependencies, I got the command to work.
Upvotes: 0