0
votes

I am using the Visual Studio Code to work with TypeScript. I created the tasks.json file in order to compile the ts files, but I getting this error when I run it:

/bin/sh: tsc: command not found
The terminal process terminated with exit code: 127

This is my tasks.json file:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "type": "typescript",
            "tsconfig": "tsconfig.json",
            "problemMatcher": [
                "$tsc"
            ]
        }
    ]
}

Does anyone know what is this? I am using Linux Mint.

It is not duplicated one of tsc is not recognized as internal or external command I already tried those steps but it did not worked.

This is my tsconfig.json:

{
    "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "sourceMap": true
    }
}

Using the terminal when I type node -v it is showing this: v11.2.0

tsc -v: Version 3.1.6

1
Hi tink, No, it is not duplicated. - Edmar Munhoz
From the cited duplicate, you are lacking .vscode/tasks.json in tasks.json (among other things). Until you provide accurate information, like the exact configuration and exact error message, your question appears to be a duplicate. - jww
I added more information, do you think you need more information? - Edmar Munhoz

1 Answers

1
votes

It appears that the binary tsc is not in your path. Have the package(s) for TypeScript been installed? This is probably a duplicate of tsc is not recognized as internal or external command