node.js - Node js npm 安装 github 包失败

标签 node.js git ubuntu github npm

当前正在尝试安装 Node js 模块,其中一些模块安装得很好,但那些需要 gihub 的模块却说 npm ERR!获取失败,如 npm install socket.io 给出

npm ERR! fetch failed https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz

ws@0.4.31 install /home/robert/node_modules/socket.io/node_modules/engine.io/node_modules/ws (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory /home/robert/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished COPY Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node SOLINK_MODULE(target) Release/obj.target/validation.node: Finished COPY Release/validation.node make: Leaving directory/home/robert/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'

我已经运行了 npm config setregistry "http://registry.npmjs.org/ " 和 npm config 设置 strict-ssl false

是否可以从 zip 文件安装 npm 更新?因为我可以通过 Firefox 访问失败的 github url,并以这种方式下载它们。

我在代理后面运行,但已将其添加到 npm 配置文件和 apt.conf 文件中,这样我就可以正确地 apt-get 或 git clone 了,有什么想法吗? 我正在运行 ubuntu 服务器,14.04 已完全更新

最佳答案

这个问题看起来像是你的代理的问题,以及他如何处理 github 访问的问题。 请使用本站搜索功能google ,你会发现很多相关的问题。

我认为这个问题可能对你有帮助: git is blocked, how to install npm modules

附注https://www.google.com/search?btnG=1&pws=0&q=npm+github+proxy&gws_rd=ssl

关于node.js - Node js npm 安装 github 包失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25870423/

相关文章:

javascript - 将参数传递给另一个文件 JS 中的函数

git - git 文件名中的冒号。 Windows开发者报警了?

git - 如果 git 设置为 core.autocrlf false,是否可以从浏览器窗口粘贴代码片段?

mysql - 如何添加mysql skip name resolve

linux - 如何从 Bash 中的字符串中删除所有非数字字符?

javascript - Node.js、Jade/Pug,如何提供全部和部分模板?

node.js - 无法使用我的 heroku 应用程序连接到 mongodb 数据库?

node.js - 为什么在使用 oauth 访问 token 进行身份验证的同时尝试发布到 github API 时会收到 404 响应?

regex - 如何在我的整个 git 存储库的提交历史记录中搜索字符串更改?

linux - dh : unable to load addon autoreconf in Ubuntu 14. 04