Skip to content

Obviate.io

To anticipate and prevent

  • Home
  • About Us
  • History
  • Privacy Policy
  • Toggle search form

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

    More Related Articles

    Lost some files in AWS Glacier? I found ’em AWS
    Taking Ubuntu 12.04 Precise Pangolin for a spin Reviews
    Securing your Apple adapters in conference rooms Tech

    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.

    July 2013
    S M T W T F S
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
    « Jun   Aug »

    Copyright © 2022 Obviate.io

    Powered by PressBook Premium theme