Product designer

Front-end developer

Full-stack UX design specialist

For business enquiries or casual chatter—do drop me a line at lp.frtoip@olleh. I ♥︎ emails.


ArticleTroubleshooting command line tools


Should you run into troubles with running libraries like NodeJS or PhantomJS installed with Brew, this might be the very process to get around it all. Specifically, those are the steps I recently followed to fix Node setup on my Mac.

Locate binary of the library

Assuming that npm -v gets you command not found.

$ brew info node

You should get something like this:

node: stable 0.10.29 (bottled), devel 0.11.13, HEAD
http://nodejs.org/
/usr/local/Cellar/node/0.8.8 (1563 files, 19M)
/usr/local/Cellar/node/0.10.17 (1093 files, 16M)
  Built from source
/usr/local/Cellar/node/0.10.29 (1547 files, 18M) *

Dive into that folder with cd /usr/local/Cellar/node/0.10.29 and check where the binary file is. I found mine in /usr/local/Cellar/node/0.10.29/bin/node.

Figure out your $PATH file configuration

$ echo $PATH

And you should get similar output:

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

Check if /usr/local/bin exists, if not, create it:

$ mkdir -p /usr/local/bin
$ ln -s /usr/local/Cellar/node/0.10.29/bin/node /usr/local/bin

Check if the link works with which node and you should now see something like this:

/usr/local/bin/node

Meaning we’re good and you are welcome.