Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition met but command [tsc --watch] raised an error - [Error: command 'tsc' not found] #24

Open
PaloMraz opened this issue Sep 14, 2018 · 2 comments

Comments

@PaloMraz
Copy link

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
@ylc395
Copy link

ylc395 commented Oct 19, 2018

I figured out that so-called "command" in this extension is not "shell commands", but "VSCode command". Check in this issue: microsoft/vscode-docs#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

@xenoterracide
Copy link

what is the task name for tsc: watch? doesn't seem like something we've defined...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants