(.\ionic.config.json) is not valid JSON format

In order for me to proxy, I decided to edit the ionic.config.json file from

  "name": "dummy",
  "app_id": "",
  "type": "ionic-angular"

to this

  "name": "headsup",
  "app_id": "0",
  "type": "ionic-angular",
  "proxies": [
      "path": "/api",
      "proxyUrl": "http://cors.api.com/api"

and now this error has been popping out every time i type ionic

[ERROR] The config file (.\ionic.config.json) is not valid JSON format.

        Please fix any JSON errors in the file.

I tried reverting the changes i did to the ionic.config.json, restarting the computer, deleting the config.json in C:\Users\XXXXX\ .ionic. And so far, nothing is working.

I’m not working on Windows but, there are some existing problems.

Did you try this?

What you posted is valid JSON, so the only thing that could be wrong is that you didn’t post your actual file or that there are hidden characters in your actual file. Just copy your file to https://jsonlint.com/ and format it, delete the old file, copy it back into a new file to make sur everything is clean.

1 Like

I tried doing the solutions proposed on that thread. but the files that needs to be changed doesn’t seem to exist on my ionic project like the ff:




Luckily, my previous repository seems to be working. I reverted the project back and all I need to do is redo the changes.

13 posts were split to a new topic: Ionic.config.json is not valid JSON format

I had the same problem and this solved it :+1:

1 Like

You can use this tool to format JSON: JSON Formatter. It’s quite simple to use

If your operative system is windows, go to directory C:/Users/yourUser and delete the folder “.ionic” before open de cdm or your terminal favorite and execute: npm install -g ionic@latest