Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Upgrade Node.js with Homebrew
$ brew upgrade node
==> Upgrading node
==> Downloading http://nodejs.org/dist/v0.8.0/node-v0.8.0.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/node/0.8.0 --without-npm
==> make install
==> Caveats
Homebrew has NOT installed npm. We recommend the following method of
installation:
curl http://npmjs.org/install.sh | sh
After installing, add the following path to your NODE_PATH environment
variable to have npm libraries picked up:
/usr/local/lib/node_modules
==> Summary
/usr/local/Cellar/node/0.8.0: 79 files, 11M, built in 3.7 minutes
$ node -v
v0.8.0
$ curl http://npmjs.org/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
101 7881 101 7881 0 0 20527 0 --:--:-- --:--:-- --:--:-- 41920
tar=/usr/bin/tar
version:
bsdtar 2.6.2 - libarchive 2.6.2
install npm@1.1
fetching: http://registry.npmjs.org/npm/-/npm-1.1.32.tgz
0.8.0
1.1.32
cleanup prefix=/usr/local
All clean!
> npm@1.1.32 prepublish .
> npm prune ; make -j4 doc
sh: npm: command not found
make: Nothing to be done for `doc'.
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm@1.1.32 /usr/local/lib/node_modules/npm
It worked
$
@ibio
Copy link

ibio commented Jun 3, 2016

Nice!

@AnabelGonzalez
Copy link

AnabelGonzalez commented Feb 5, 2018

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment