[英]/bin/sh: tsc: command not found
I am using the Visual Studio Code to work with TypeScript. 我正在使用Visual Studio Code来处理TypeScript。 I created the tasks.json file in order to compile the ts files, but I getting this error when I run it:
我创建了task.json文件以编译ts文件,但是在运行它时出现此错误:
/bin/sh: tsc: command not found
The terminal process terminated with exit code: 127
This is my tasks.json file: 这是我的task.json文件:
{
// 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.
我正在使用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. 它不是重复的, 不能将tsc之一识别为内部或外部命令,我已经尝试过这些步骤,但是没有起作用。
This is my tsconfig.json: 这是我的tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true
}
}
Using the terminal when I type node -v it is showing this: v11.2.0 在键入node -v时使用终端,它显示如下:v11.2.0
tsc -v: Version 3.1.6 tsc -v:版本3.1.6
It appears that the binary tsc
is not in your path. 看来二进制
tsc
不在您的路径中。 Have the package(s) for TypeScript been installed? 是否已安装TypeScript软件包? This is probably a duplicate of tsc is not recognized as internal or external command
这可能是tsc的重复, 无法识别为内部或外部命令
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.