==> ./configure --prefix=/usr/local/Cellar/node/0.8.11
==> make install
==> Caveats
Homebrew installed npm.
We recommend prepending the following path to your PATH environment
variable to have npm-installed binaries picked up:
/usr/local/share/npm/bin
Warning: Could not link node. Unlinking...
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link node'
==> Summary
/usr/local/Cellar/node/0.8.11: 856 files, 13M, built in 108 seconds(snip-snip other upgrades)

Edit: ran the same update/upgrade/link/unlink procedure on a colleague's computer - in this case the symlinks went from 775 to 318 to 226, where it stabilized. Does anyone else have similar numbers? Do they depend on other installed brew recipes, or perhaps on npm modules?

Did you run brew doctor? That's the first thing to do in case of problems. The culprit seems to be /usr/local/lib/node_modules/npm/scripts/relocate.sh. Could it be that you installed a non-Homebrew version of Node? In that case, the file above would have non-Homebrew ownership and brew gets confused. There are apparently other such files.
–
DominiqueJan 30 '13 at 13:01

@Dominique: brew doctor only gives me warnings about having Mono (conflicting pkg-config) installed. Don't think I've had another node installed, but it's possible. My colleague, who had the same problem, may have added manual node compilation to a shared project setup script (he's working in both Ubuntu & Mac) to get the latest version on Ubuntu. Haven't seen this linking warning in a while now, and unlinking/linking node 0.8.18 is stable on 307/307 symlinks =)
–
Joel PurraJan 30 '13 at 14:03

1 Answer
1

Do you have several versions of Node installed via homebrew? Every time it updates node homebrew puts the newest version alongside the old one and then updates the symlinks to the newest version. Running the brew cleanup should reduce that up a bit for you.