I'm trying to execute node-dev in a sublime text 3 build system. node-dev is in my path:
Yet when I run this build script:
{
"cmd": ["node-dev", "$file"],
"selector": "*.js"
}
I get this error, which also shows that npm is in my path.
yet when I run with the same build script using node instead of node-dev it executes just fine.
I've also tried to include the "path" variable pointing at the node-dev bin folder, which didn't help at all.
Any help would be appreciated. Thanks.
Following worked for me in Sublime Text 3 on Windows
{ "shell_cmd": "node ${file}", "selector" : "source.js" }
Prerequisite is to have node.js installed
Sublime text docs:
https://www.sublimetext.com/docs/build_systems.html
shell
Optional. If true, cmd will be run through the shell (cmd.exe,
bash
…)
Try to add "shell : true
{
"cmd": ["node-dev", "$file"],
"selector": "source.js",
"windows" : {
"shell": true
}
}
The command is incorrect for Sublime Text 3 :)
This is one example of running node as build system:
{
"shell_cmd": "taskkill /F /IM node.exe & node ${file}"
}
Please note that the array-version doesn't work like in Sublime Text 2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With