【发布时间】:2018-08-20 11:41:19
【问题描述】:
我正在尝试编译 TypeScript 和 NodeJS,遇到此错误有什么帮助吗?
tsc --version => 版本 2.7.2
error TS5023: Unknown compiler option 'lib'.
error TS5023: Unknown compiler option 'strict'.
error TS5023: Unknown compiler option 'esModuleInterop'.
The terminal process terminated with exit code: 1
更新,添加 tsconfig.json
{
"compilerOptions": {
"target": "ES5",
"module": "commonjs",
"lib": ["es2015"],
"sourceMap": true,
"strict": true,
"esModuleInterop": true,
"mapRoot": "./map"
}
}
【问题讨论】:
-
你的 tsconfig.json 中有什么?
-
更新问题
-
在命令行上执行
tsc可能只会为您提供全局安装的版本。你的 local typescript 版本更新了吗?
标签: node.js typescript visual-studio-code