Installing NPM with NVM unmatched brace at pos 2

I'm working to install NPM but running into errors. Here's where I've tried:

b-2:bin X$ nvm use v0.4.12
Now using node v0.4.12
b-2:bin X$ curl https://npmjs.org/install.sh  | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7882  100  7882    0     0  17347      0 --:--:-- --:--:-- --:--:-- 22140
tar=/usr/bin/tar
version:
bsdtar 2.8.3 - libarchive 2.8.3
install npm@1.0
fetching: {
curl: (3) [globbing] unmatched brace at pos 2
npm-install-30810.sh: line 228: cd: /var/folders/g_/kythn1dx4fbbry5npb4jx1cr0000gn/T//npm.30813/*: No such file or directory
It failed

Any ideas why NPM is not installing? Thanks

For node 0.4.x you need npm 1.0.x, but...

It seems that npm 1.0 is no longer available at npmjs.org. Installation script install.sh is trying to download metadata json file from https://registry.npmjs.org/npm/1.0 which now contains:

{"error":"version not found: 1.0"}

But still you can build it from scratch cloning 1.0 branch from github:

$ git clone https://github.com/isaacs/npm.git npm
$ cd npm
$ git checkout 1.0
$ ./configure
$ make
$ make install
$ npm -v
1.0.106