subtleGradient / javascript-tools.tmbundle

Essential Tools for developing Javascript in TextMate
602 stars 96 forks source link

Help people install node.js #6

Open subtleGradient opened 12 years ago

subtleGradient commented 12 years ago

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.

por commented 12 years ago

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
heygambo commented 12 years ago

thx! That really grinded my gears :)

davidcalhoun commented 12 years ago

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.

heygambo commented 12 years ago

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

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

kristoferjoseph commented 12 years ago

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

dtan commented 12 years ago

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.

kristoferjoseph commented 12 years ago

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

dtan commented 12 years ago

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

simonwheatley commented 12 years ago

I installed on Macports by:

Worked straightaway for me. YMMV.

Laner commented 12 years ago

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

subtleGradient commented 12 years ago

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

Laner commented 12 years ago

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

subtleGradient commented 12 years ago

@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

Laner commented 12 years ago

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

subtleGradient commented 12 years ago

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

Laner commented 12 years ago

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

subtleGradient commented 12 years ago

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

Laner commented 12 years ago

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

subtleGradient commented 12 years ago

That's in a different bundle