0
我使用vscode此tasks.json文件:打字稿上vscode任务未知选项文件
{
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-p", "."],
"showOutput": "silent",
"problemMatcher": "$tsc"
}
VsCode告诉我:
error TS5007: Cannot resolve referenced file: '.'.
error TS5023: Unknown option 'p'
Use the '--help' flag to see options.
这是项目结构:
│ .gitignore
│ package.json
│ tsconfig.json
│
├───.vscode
│ settings.json
│ tasks.json
└───src
│ configuration.ts
│ index.ts
│ variables.ts
│
├───api
│ api.ts
│ UsersApi.ts
│
└───model
models.ts
我已经创建了一个公共存储库,以便您可以在那里查看。 Here you can see the files。
使用
"command": "./node_modules/typescript/bin/tsc"
谢谢@Matt。我不知道为什么系统选择旧版本(1.0.3),因为我全局安装了新版本('npm list -g depth = 0打印出来:打字稿@ 2.0.10'),有什么想法?现在,它告诉我,“。”不是一个可识别的外部命令... – Jordi