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

shell_cmd": "taskkill /F /IM node.exe & node $file not working with Sublime Text 3 on Windows 7 #90

Open
leem32 opened this issue Mar 24, 2018 · 1 comment

Comments

@leem32
Copy link

leem32 commented Mar 24, 2018

The line in sublime-build "shell_cmd": "taskkill /F /IM node.exe & node $file" is causing an error ERROR: The process "node.exe" not found..

If I comment out the taskkill line the error disappears.

I've added "node_command": "C:\\Program Files\\nodejs\\node.exe" in user sublime-settings.

How can I fix this??

{
  "cmd": ["node", "$file"],
  "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
  "selector": "source.js",
  "shell": true,
  "encoding": "cp1252",
  "windows":
    {
        "shell_cmd": "taskkill /F /IM node.exe & node $file"
    },
    "linux":
    {
        "shell_cmd": "killall node; /usr/bin/env node $file"
    },
    "osx":
    {
        "shell_cmd": "killall node; /usr/bin/env node $file"
    }
}
@leem32
Copy link
Author

leem32 commented Aug 9, 2019

I just had this problem again and found this question from a Google search that I'd forgot I had written lol.

I fixed this issue by adding the path to node.exe in the nodejs.sublime-build file.

  "windows":
    {
        "shell_cmd": "taskkill /F /IM C:/Program\ Files/nodejs/node.exe & node $file"

The backslash is to escape the space. It bugs out without the backslash.

I don't understand why sublime text nodejs.sublime-build can't find node.exe because it's in my PATH and it works from the command line. Anyway, that fixes the problem.

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

1 participant