【发布时间】:2019-04-19 21:54:53
【问题描述】:
我正在使用 Visual Studio Code 来处理 TypeScript。 我创建了 tasks.json 文件以编译 ts 文件,但运行时出现此错误:
/bin/sh: tsc: command not found
The terminal process terminated with exit code: 127
这是我的 tasks.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"
]
}
]
}
有人知道这是什么吗? 我正在使用 Linux Mint。
不重复tsc is not recognized as internal or external command之一 我已经尝试了这些步骤,但没有奏效。
这是我的 tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true
}
}
当我输入 node -v 时使用终端显示: v11.2.0
tsc -v: 版本 3.1.6
【问题讨论】:
-
嗨叮当,不,它不是重复的。
-
从引用的副本中,您在
tasks.json中缺少.vscode/tasks.json(除其他外)。在您提供准确的信息(例如准确的配置和准确的错误消息)之前,您的问题似乎是重复的。 -
我添加了更多信息,您认为您需要更多信息吗?
标签: linux angular typescript visual-studio-code linux-mint