我正在努力安装NPM但遇到错误。这是我尝试过的地方:
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
为什么没有安装NPM的想法?感谢
答案 0 :(得分:0)
对于节点0.4.x,您需要npm 1.0.x,但是......
npmjs.org似乎不再提供npm 1.0。安装脚本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