VS CODE error S5057 cannot find a tsconfig.json file at the specified directory: '.'

I put the tsconfig.js into the root folder, then I can build my .ts file anywhere in the project folder.


For the most people on Visual Studio Code, it will be sufficient just to create tsconfig.json file in the document root (that's probably where your .ts files are) with simple contents: {}.

This means "an empty JSON file <...>. This will be sufficient for most people."


I got similar error. Solved by changing following line in tasks.json

"args": ["-p", "."],

to

"args": ["-p", "./src"],

In my case tsconfig.json was was in src folder. The Angular 2 project was created using angular-cli.