因此,当通过命令yaourt -S atom-editor下载Atom时,我会得到以下错误:
Installing build modules...
npm ERR! Linux 4.5.4-1-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "--userconfig=/tmp/yaourt-tmp-shazam/aur-atom-editor-arch/src/atom-1.8.0/build/.npmrc" "install"
npm ERR! node v6.2.0
npm ERR! npm v3.9.3
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect
npm ERR! Error: connect ECONNREFUSED 199.27.76.162:443
npm ERR! at Object.exports._errnoException (util.js:953:11)
npm ERR! at exports._exceptionWithHostPort (util.js:976:20)
npm ERR! at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
npm ERR! { Error: connect ECONNREFUSED 199.27.76.162:443
npm ERR! at Object.exports._errnoException (util.js:953:11)
npm ERR! at exports._exceptionWithHostPort (util.js:976:20)
npm ERR! at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect',
npm ERR! address: '199.27.76.162',
npm ERR! port: 443,
npm ERR! parent: 'atom-build' }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/yaourt-tmp-shazam/aur-atom-editor-arch/src/atom-1.8.0/build/npm-debug.log
Node: v6.2.0
npm: v3.9.3我已经用export all_proxy=proxy.iisc.ernet.in:3128设置了环境变量,这是我的公司代理。我还用npm set all_proxy proxy.iisc.ernet.in:3128设置了npm代理。我在npm上设置了错误的变量吗?
注:这是这问题的一个分支。
发布于 2016-06-14 17:59:49
如果您的公司代理使用来自微软的NTLM,则可能需要CLTM。
在将cntlm代理服务器配置为上游代理(即公司代理)之后,只需配置npm以使用它:
npm config set proxy http://127.0.0.1:3128
npm config set https-proxy http://127.0.0.1:3128您必须同时拥有http和https。如果在配置文件中配置了代理,而不是环境变量,那么大多数包管理器的工作效果最好,后者更适合从命令行运行脚本。
但是,您的错误代码显示“连接被拒绝”,因此这可能是出站防火墙、SELinux阻塞或代理主机端口错误。尝试从同一用户进行远程上网,以查看它是否工作,以及端口是否在代理上打开。
发布于 2016-06-10 09:37:08
根据npm配置帮助,它只会从环境中派生代理设置。
如果设置了HTTPS_PROXY、https_proxy、HTTP_PROXY或http_proxy环境变量
(在https_proxy部分中,proxy部分只提到HTTP_PROXY和http_proxy)。
该帮助还没有将all_proxy列为任何地方的配置键,只有https_proxy和proxy,这解释了为什么all_proxy设置没有任何效果。
发布于 2021-04-20 05:33:30
npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/https://unix.stackexchange.com/questions/288909
复制相似问题