Error compiling typescript with visual studio code

0

I'm trying to start in typescript and I have some problems.

First of all some data:

I have installed version 1.11.2 of the Visual Studio Code
And I'm running Node 6.5.0 along with typescript in version 2.2.2

The problem I have is that when trying to compile with Ctrol + Shift + B , in the output I see the following error:

error TS5014: Failed to parse file 'tsconfig.json': Unexpected token / in JSON at position 0.

I leave a copy of my tsconfig.json file here below

// tsconfig.json
{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "sourceMap": true,
        "watch": true,
        "outDir": "build"
    },
    "exclude": [
        "node_modules"
    ]
}

Also I leave a rar attached with the test project

I guess it must be a problem in my configuration or something that I'm jumping, how can I fix it?

    
asked by Pablo 04.05.2017 в 15:17
source

1 answer

3

Try removing the comment, as far as it goes, TypeScript does not allow comments in the configuration file.

    
answered by 04.05.2017 / 15:27
source