Skip to content

Obviate.io

To anticipate and prevent

Setting up Node.JS on OSX – Quick and Easy

Posted on 2013-07-24 By Jon No Comments on Setting up Node.JS on OSX – Quick and Easy

nodejs
nodejs

Recently, I’ve gotten into learning Node.JS. Installing Node on my servers for remote development is easy enough with a wajig install nodejs, however I want to be able to work off my laptop while I’m on vacation. While it’s not quite as easy as one command, it really isn’t that hard to setup.

You can simply download and install the

NodeJS package, but getting NodeJS up and running “nicely” requires you use something like Homebrew or MacPorts. My preference is Homebrew, so the instructions reflect that:

  • Download & Install Command Line Tools for Xcode
  • Install Homebrew by running the following in a terminal window:
  • ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  • Run brew doctor as instructed and fix any issues you might have.
  • Update your PATH variable
  • (in a terminal) nano ~/.profile
  • Add a single line that reads: export PATH=$PATH:/usr/local/sbin:/usr/local/share/npm/bin/
  • Restart terminal window
  • brew install nodejs
  • brew install npm
  • Done!

    At this point you’ll have a functional Node.JS and npm environment (Yes, technically you don’t need npm — but that is like running Debian/Ubuntu without apt-get… why would you?). While you’re at it, you might consider adding Bower ( npm install bower ) for your frontends needs. Now go forth and Javascript! (Really never thought I’d ever say that again after the mid 90s)

  • Code Tags:bower, homebrew, javascript, mac, macports, node.js, nodejs, npm, osx

    Post navigation

    Previous Post: Ubuntu Edge – PR ploy or real shot?
    Next Post: A collection of useful/nifty/cool ST2 Plugins

    Related Posts

    Using Geckoboard with HelpSpot Code
    “405 Method Not Allowed” on Google Code Cloud
    Re-Bootstrap’ing JonDavis.name Code
    Automated Screen Launch Code
    Bafflingly stupid programming & error reporting Code
    AndroiDev: Leaky Windows Android

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    Copyright © 2026 Obviate.io.

    Powered by PressBook Masonry Dark