我是nodejs的新手,我刚刚在我的Windows 7 PC上安装了它。我尝试做的下一件事是通过 npm npm installexpress --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
有人知道为什么吗?
最佳答案
原来是我们的代理服务器实际上阻止了http://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.6.tgz
关于node.js - nodejs npm 包安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27927805/