javascript-tools.tmbundle icon indicating copy to clipboard operation
javascript-tools.tmbundle copied to clipboard

Help people install node.js

Open subtleGradient opened this issue 14 years ago • 19 comments

This bundle now requires node.js.

I need to add some documentation describing how to install it and how to configure your PATH in TextMate.

subtleGradient avatar Jul 31 '11 17:07 subtleGradient

EDIT: Fixed this by going to TextMate → Preferences → Advanced → Shell Variables and adding /usr/local/bin, basically the path to where node lives on my machine ($which node).

I have node.js installed with brew, but getting this error on Cmd+S. Is that related to this issue?

Couldn't find node

Locations searched:

/Users/tim/Library/Application Support/TextMate/Bundles/javascript-tools.tmbundle/Support/bin
/Applications/TextMate.app/Contents/SharedSupport/Support/bin/CocoaDialog.app/Contents/MacOS
/usr/bin
/bin
/usr/sbin
/sbin
/Applications/TextMate.app/Contents/SharedSupport/Support/bin

por avatar Aug 01 '11 11:08 por

thx! That really grinded my gears :)

heygambo avatar Aug 19 '11 08:08 heygambo

Ah, this was quite annoying. I have my node install in another place too and had no idea where to start looking to fix this, other than reinstalling Node in one of those directories.

davidcalhoun avatar Sep 08 '11 01:09 davidcalhoun

I installed Node using Brew and put this into my PATH Shell Variable:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

heygambo avatar Sep 20 '11 09:09 heygambo

NOTE: you need to remove the last node from which node. example: which node returns /Users/foo/local/node/bin/node ( or something similar ) what you put in at the end of your PATH variable in Textmates advanced preferences panel is /Users/foo/local/node/bin

kristoferjoseph avatar Nov 01 '11 19:11 kristoferjoseph

I'm still having issues with the "JSHint" pop up dialog box when saving a js file

/Users/username/Library/Application Support/TextMate/Bundles/javascript-tools.tmbundle/Support/bin
/Applications/TextMate.app/Contents/SharedSupport/Support/bin/CocoaDialog.app/Contents/MacOS
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/lib/node
/Applications/TextMate.app/Contents/SharedSupport/Support/bin

I have node installed in /usr/local/lib/node. I also added that to my TextMate's PATH variable but that pop up is still showing that error.

dtan avatar Nov 12 '11 23:11 dtan

Path needs to be set in TM path as /usr/local/lib/node/bin. At least that was what worked for me.

kristoferjoseph avatar Nov 13 '11 01:11 kristoferjoseph

pointing it to /usr/local/lib/node/bin still doesn't work for me. in the interim, i've just disabled the JSHint keyboard shortcut

dtan avatar Nov 13 '11 20:11 dtan

I installed on Macports by:

  • From the Terminal: sudo port install nodejs
  • Made a cup of tea
  • In TextMate prefs > Advanced > Shell Variables I already had a PATH variable, so I double clicked on the value and appended :/opt/local/bin
  • Close TextMate prefs

Worked straightaway for me. YMMV.

simonwheatley avatar Dec 18 '11 12:12 simonwheatley

I used homebrew. And none of the above paths work :(

Laner avatar Jan 27 '12 08:01 Laner

Now that node.js has a proper Mac installer, I highly recommend that everyone install it that way.

subtleGradient avatar Jan 27 '12 20:01 subtleGradient

Great! But to no avail. Installed it this way, but no go in Textmate :(

Laner avatar Feb 01 '12 07:02 Laner

@laner

  1. open Terminal.app
  2. type echo $PATH

Mine returns…

iMac:~ thomas$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

If you don't have /usr/local/bin in your $PATH then you have something goofed up in your bash profile somehow.

tl;dr — make it work in the Terminal and it should Just Work™ in TextMate

subtleGradient avatar Feb 03 '12 04:02 subtleGradient

Hmmm. /usr/local/bin is in the path. Weird. All I want is something like labs.codecademy.com for my mac. Any suggestions?

Laner avatar Feb 05 '12 16:02 Laner

@Laner this bundle doesn't really do anything quite like that.

subtleGradient avatar Feb 09 '12 02:02 subtleGradient

@subtleGradient To bad. But is there a way to test run js from textmate and get console.logs and alert/prompts?

Laner avatar Mar 21 '12 07:03 Laner

Oh of course. I have various Run JavaScript commands that execute code in WebKit or Node.js or even PhantomJS.

subtleGradient avatar Mar 21 '12 15:03 subtleGradient

I can't get node.js to work. How do I run js through webkit, if you don't mind me asking

Laner avatar Mar 21 '12 21:03 Laner

That's in a different bundle

subtleGradient avatar Jul 03 '12 20:07 subtleGradient