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

    SocketIO IRC-style Tutorial – Part 4 – The client code Cloud
    Exploring PHP IDEs: PhpStorm Code
    Serendipity to WordPress – Importer version 1.5 Code
    “405 Method Not Allowed” on Google Code Cloud
    AndroiDev: UnknownHostException Android
    Introducing pyLegLight – A Python module for the Elgato Key Lights Code

    Leave a Reply Cancel reply

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

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Copyright © 2026 Obviate.io.

    Powered by PressBook Masonry Dark