Hoppe
Hoppe

Reputation: 6805

Build: Failed to parse file 'C:/.../tsconfig.json/tsconfig.json': Invalid character. C:\..\VSTSC

Learning TypeScript and Visual Studio is complaining:

Build: Failed to parse file 'C:/.../tsconfig.json/tsconfig.json': Invalid character. C:..\VSTSC

Strangely, there is no tsconfig.json/tsconfig.json file. There is only a tsconfig.json file.

My tsconfig.json file is:

{
  "compilerOptions":{
      "target" : "es5",
      "sourceMap": true,
      "rootDir": "src"        
  }
}

Visual Studio has stopped transpiling my TypeScript. How can I resolve this issue?

Excluding tsconfig.json resolve the issue... but is there another way?

Is it because of this message?

Your project file uses an older version of the TypeScript compiler and tools than supported by this version of Visual Studio. Your project may be using TypeScript language features that will result in errors when compiling with this version of the TypeScript tools. To remove this warning, remove the element from your project file

Upvotes: 3

Views: 2490

Answers (1)

Hoppe
Hoppe

Reputation: 6805

Restarting Visual Studio prompted a warning to show up that I had previously ignored. The solution is right in the warning:

Your project file uses an older version of the TypeScript compiler and tools than supported by this version of Visual Studio. Your project may be using TypeScript language features that will result in errors when compiling with this version of the TypeScript tools. To remove this warning, remove the element from your project file

Removing it solved the problem... but then I believe I am forced to use the installed version of TypeScript.

Upvotes: 1

Related Questions