1

When I press CMD+SHIFT+B in Visual Studio Code (to compile typescript to javascript) I get the following error:

No build task defined. Mark a task with 'isBuildCommand' in the tasks.json file.

My tasks.json file looks like this. This has always worked in any other Typescript project.

{
    "version": "0.1.0",
    "command": "tsc",
    "isShellCommand": true,
    "args": ["-w"],
    "problemMatcher": "$tsc"
}

It doesn't work, and even when I add 'isBuildCommand', I still get the same error!

{
    "version": "0.1.0",
    "command": "tsc",
    "isBuildCommand": true,
    "args": ["-w"],
    "problemMatcher": "$tsc"
}

1 Answer 1

3

This is an open issue with the latest version of VS Code. The workaround is to close the folder and open it again.

Related issue: https://github.com/Microsoft/vscode/issues/24796

Sign up to request clarification or add additional context in comments.

1 Comment

I have the same problem since two days ago. I tried the suggestion closing and opening the folder...closing and opening visual studio code...uninstalling and installing visual studio code...the warning message still appears...and my typescript files are not transpiled...Is this a bug in the version 1.11.2? (that's the version installed in my pc - windows 8.1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.