node.js - APM 在公司代理后面不起作用

标签 node.js linux ubuntu atom-editor

我在运行 (sudo) apm install minimap(或任何其他软件包)时遇到的错误:

gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@0.10.35 | linux | x64
gyp http GET https://atom.io/download/atom-shell/v0.21.0/node-v0.21.0.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error 
gyp ERR! stack Error: tunneling socket could not be established, cause=Parse Error
gyp ERR! stack     at ClientRequest.onError (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:168:17)
gyp ERR! stack     at ClientRequest.g (events.js:180:16)
gyp ERR! stack     at ClientRequest.emit (events.js:95:17)
gyp ERR! stack     at Socket.socketOnData (http.js:1593:9)
gyp ERR! stack     at TCP.onread (net.js:528:27)
gyp ERR! System Linux 3.13.0-45-generic
gyp ERR! command "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.21.0" "--dist-url=https://atom.io/download/atom-shell" "--arch=x64" "--ensure" "--proxy=http://172.31.1.4:8080/"
gyp ERR! cwd /home/anmol/.atom
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 

最佳答案

您可以通过在终端中输入来为 Atom 设置代理:

$ apm config set proxy "http://user:pass@host:port"
$ apm config set https_proxy "http://user:pass@host:port"

之后,您可以打开 Atom 并看到快速结果;)

关于node.js - APM 在公司代理后面不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28650806/

相关文章:

javascript - gulp.js 错误

linux - SaltStack U 盘部署

laravel php artisan serve 命令有效,但 localhost url 在 ubuntu 18.10 中不起作用

ubuntu - 在ubuntu中通过终端访问无线网络

javascript - GraphQL.js - 使用接口(interface)作为 resolveType 函数中的默认(回退)类型

javascript - npm(和 Node )最新版本的未满足的依赖关系

node.js - 错误 : The request signature we calculated does not match the signature you provided. 检查您的 key 和签名方法

linux - 我可以通过在可执行文件中硬编码库路径来避免导出 LD_LIBRARY_PATH 吗?

linux - 如何在 bash 中组合 'tail -f' 和 'grep'?

python - 如果我有 PPP 连接,如何通过 python 脚本识别,如果有,打开 LED?