【问题标题】:nodejs npm package install failednodejs npm包安装失败
【发布时间】:2015-01-14 02:13:57
【问题描述】:

我是 nodejs 的新手,我刚刚在我的 Windows 7 PC 上安装了它。接下来我尝试通过 npm npm install express --save 安装 express.js 包,我收到以下错误消息

npm ERR! fetch failed http://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.6.tgz
npm ERR! Error: 403 Forbidden
npm ERR!     at WriteStream.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\fetch.js:58:12)
npm ERR!     at WriteStream.emit (events.js:117:20)
npm ERR!     at evalmachine.<anonymous>:1610:14
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:102:5
npm ERR!     at Object.oncomplete (evalmachine.<anonymous>:108:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express" "--save"
npm ERR! cwd C:\temp\NodeJS_POC
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! not ok code 0

有人知道为什么吗?

【问题讨论】:

  • 您是否碰巧在代理背后?
  • 是的,在 NTLM 代理之后,但我已经安装了 CNTLM 工具 (stackoverflow.com/questions/18569054/npm-behind-ntlm-proxy) 来为 npm 启用常规代理。我运行了npm view qunit 命令,它运行良好。
  • 抱歉,今天早上刚回来。很高兴看到您发现了问题。

标签: node.js express npm


【解决方案1】:

原来是我们的代理服务器实际上阻止了http://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.6.tgz

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-06
    • 2018-05-11
    • 2017-02-04
    • 2012-12-07
    相关资源
    最近更新 更多