2013-08-03 37 views
0

我正在努力安装NPM,但遇到错误。这里是我试过的地方:安装带有NVM的NPM无与伦比的大括号2

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 [email protected] 
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 

任何想法为什么NPM不安装?由于

回答

0

对于需要NPM 1.0.x的节点0.4.x,但...

看来,NPM 1.0不再可用在npmjs.org。安装脚本install.sh正试图从https://registry.npmjs.org/npm/1.0现在包含下载的元数据JSON文件:

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

但你仍然可以从头克隆从GitHub构建它1.0分支:

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