# using Homebrew PREFIX=$(brew --prefix) # do this to get just the npm recipe from my homebrew fork. cd $PREFIX git remote add isaacs git://github.com/isaacs/homebrew.git git fetch -a isaacs git checkout isaacs/master -- Library/Formula/npm.rb # alternatively, you could also do this if you prefer to avoid git: # curl https://github.com/isaacs/homebrew/raw/master/Library/Formula/npm.rb > $PREFIX/Library/Formula/npm.rb brew install npm # now do ALL the things that it says to do, or it won't work properly!