当前正在尝试安装 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/