2

error screenshot

Help I got this error when try to setup jsconfig.json, how to solve this problem? this my jsconfig.json :

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es6",
    "sourceMap": true,
    "baseUrl": ".",
    "paths": {
      "helper": [
        "src/./helper"
      ],
      "libraries": [
        "src/./libraries"
      ],
    }
  },
  "include": ["src"]
}
Drew Reese
  • 165,259
  • 14
  • 153
  • 181

1 Answers1

3

Invalid JSON, you've a trailing comma.

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es6",
        "sourceMap": true,
        "baseUrl": ".",
        "paths": {
            "helper": [
                "src/./helper"
            ],
            "libraries": [
                "src/./libraries"
            ] // <-- no comma
        }
    },
    "include": ["src"]
}
Drew Reese
  • 165,259
  • 14
  • 153
  • 181
  • ahh thanks, usually when I write JSON there is no problem with a comma, but writing in jsconfig.json is really strict – Muhammad Irva Nov 04 '20 at 05:10
  • @MuhammadIrva Even though JSON is an acronym for JavaScript Object Notation, there is a difference between a JSON file, and a JSON object literal. Either way, if you want to check valid JSON I like this online tool: [JSONLint](https://jsonlint.com/). – Drew Reese Nov 04 '20 at 05:12
  • Thanks for your answers that really help me – Muhammad Irva Nov 04 '20 at 05:20