Skip to content

Instantly share code, notes, and snippets.

View bschaf's full-sized avatar

Brandon Schafer bschaf

View GitHub Profile
# using Homebrew
# Note: `brew install npm` has problems, as of 2010-12-30.
# hopefully it will eventually be good and happy.
# As of npm@0.2.13, however, this is an option
PREFIX=$(brew --prefix)
# take ownership
# this will also let homebrew work without using sudo
# this way is best if you want to stay up to date
# or submit patches to node or npm
mkdir ~/local
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
# could also fork, and then clone your own fork instead of the official one
git clone git://github.com/joyent/node.git
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh