angry_kiwi angry_kiwi - 4 months ago 59
Node.js Question

How to run node app with nodejs sublime plugin

I installed this plugin

https://github.com/tanepiper/SublimeText-Nodejs

It basically lets me launch node app in terminal by pressing ctrl+r. It works for the first time I tried. However later it keep saying this error

Node binary could not be found in PATH

Consider using the node_command setting for the Node plugin

PATH is: /usr/bin:/bin:/usr/sbin:/sbin


What could be the problem?

Answer

To run nodejs on sublime text2, a much more simpler way is install node package "node dev" then create a sublime text build, the code should look like this

{
  "cmd": ["node-dev", "$file"],
  "selector" : "source.js",
  "path" : "/usr/local/bin"
}

Now to run a nodejs app, go to menu->tools->build.