vscode-auto-run-command
vscode-auto-run-command copied to clipboard
Condition met but command [tsc --watch] raised an error - [Error: command 'tsc' not found]
I tried to start the TypeScript compiler in watch mode:
"auto-run-command.rules": [
{
"condition": "always",
"command": "tsc --watch",
"message": "Starting TypeScript compiler in watch mode..."
}
]
But the tool gives me "[Auto Run Command] Condition met but command [tsc --watch] raised an error - [Error: command 'tsc' not found] ". Running "tsc --watch" from the Terminal window works fine...
My VSCode version is as follows:
Version: 1.27.1 (user setup)
Commit: 5944e81f3c46a3938a82c701f96d7a59b074cfdc
Date: 2018-09-06T09:21:18.328Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
I figured out that so-called "command" in this extension is not "shell commands", but "VSCode command". Check in this issue: https://github.com/Microsoft/vscode-docs/issues/683
So maybe you can configurate a vscode task and configurate this extention like this:
"auto-run-command.rules": [
{
"condition": "always",
"command": "workbench.action.tasks.runTask YOUR_TASK_NAME",
"message": "Starting TypeScript compiler in watch mode..."
}
]
~~I don't know whether this is a best solution, but at least it works for me.~~ Now I turned to Blade Runner
what is the task name for tsc: watch? doesn't seem like something we've defined...