s-a / sublime-text-refactor

A Sublime Text Refactor Plugin for Javascript Code
213 stars 12 forks source link

/bin/sh: node: command not found #6

Closed eheiser closed 11 years ago

eheiser commented 11 years ago

I have node installed but I keep getting a "/bin/sh: node: command not found" whenever I try to use refactor in sublimetext2. Any suggestions? I'm on MacOSX 10.8.3

craigmaslowski commented 11 years ago

I just installed this and am getting the same error.

s-a commented 11 years ago

Sorry I do not use Mac, but I think the problem is an incorrect path setup. I would not suggest to copy node binary. It should be cleaner to create symlinks, but the main strategy should be to configure PATH var to correct node binary folder.

http://stackoverflow.com/questions/13593902/node-command-not-found

Symlinks workaround

As fallback workaround u could try to change the lines, _but this is not recommended_

from

    cmd = ["node", scriptPath, 

to

     cmd = ["/usr/local/bin/node", scriptPath, 

Hope this helps.

vasiliyb commented 6 years ago

for folks using nvm:

ln -s /Users/blah/.nvm/versions/node/v8.9.3/bin/node /usr/local/bin/node

unfortunately ;(