【问题标题】:Node.js: How to install NPMNode.js:如何安装 NPM
【发布时间】:2011-11-27 12:27:02
【问题描述】:

我的 windows XP 上安装了 cygwin 和 node.exe (0.5.7)。

当我git clone npm(1.0.30), cd npm, then "make install" 时,有很多 node_modules 克隆。

但在执行"node cli.js install git+https://github.com/isaac/ronnjs.git" 时它停止了。

以下是我的 npm-debug.log

如果它以 ok 结尾,它会起作用

详细 cli [ 'E:\node\node.exe',
详细 cli 'e:\github\npm\cli.js',
详细 cli 'cache',
详细 cli 'clean' ]
使用 npm@1.0.30 的信息
使用 node@v0.5.7 的信息
详细配置文件 C:\Documents and Settings\zhangchiqing.npmrc
详细配置文件 E:\etc\npmrc
错误!前缀目录不是 发现
错误!错误:ENOENT,������ɹ����ɡ�
错误! 'E:'
错误! 在以下位置报告整个日志:
ERR! http://github.com/isaacs/npm/issues
错误!或通过电子邮件发送至:
ERR! npm-@googlegroups.com
错误!
错误!系统视窗_NT 5.1.2600
错误!命令 "E:\node\node.exe" "e:\github\npm\cli.js" "cache" "clean"
错误! cwd E:\github\npm
错误!节点 -v v0.5.7
呃! npm -v 1.0.30
详细退出 [ 1, true ]

【问题讨论】:

  • npm 的问题应该在 github 页面上。 AFAIK,0.5.x 不支持 NPM,尤其是 Cygwin 不支持。尝试 0.4.x 范围内的东西。另外,你试过 Isaac 的安装脚本吗?它在 Bash 中创造了奇迹:curl http://npmjs.org/install.sh | sh
  • 您是否按照安装中描述的步骤创建链接?我没有看到你提到这一点。 "并将 mongo_hacker.js 链接到主目录中的 .mongorc.js:"

标签: node.js cygwin npm


【解决方案1】:

这适用于 Ubuntu。您必须使用旧版本的节点。

sudo apt-get install -y g++ libssl-dev apache2-utils curl git-core
git clone git://github.com/joyent/node.git
cd node
git checkout v0.4.11
./configure
make
sudo make install
node -v
curl https://npmjs.org/install.sh | sudo sh
npm -v

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-06-16
    • 2015-02-18
    • 1970-01-01
    • 1970-01-01
    • 2017-03-14
    • 2018-07-21
    • 2023-02-17
    • 2014-08-27
    相关资源
    最近更新 更多