mxcl/homebrew — Issue #9715: npm fails to install after installing Node 0.6.8
Author: hekevintran
Created: 2012-01-22 00:59:16+00:00
State: open

When I attempted to install npm, I got a message to upgrade node. I have the newest node. What is going on here? Why does npm fail to install?

```
$ brew install node
==> Downloading http://nodejs.org/dist/v0.6.8/node-v0.6.8.tar.gz
==> ./configure --prefix=/usr/local/Cellar/node/0.6.8 --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.6.8: 80 files, 7.5M, built in 7.0 minutes
```

```
$ 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 22213 0 --:--:-- --:--:-- --:--:-- 44027
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.0-2.tgz
npm-install-24008.sh: line 302: 24042 Segmentation fault "$node" node_modules/semver/bin/semver -v "$node_version" -r "$req"
You need node to run this program.
node --version reports: v0.6.8
Please upgrade node before continuing.
It failed
```