繁体   English   中英

在位置2安装带有NVM无与伦比的支撑的NPM

[英]Installing NPM with NVM unmatched brace at pos 2

我正在安装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.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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM