1

So while downloading the Atom Text Editor through the command yaourt -S atom-editor, but I get these errors:

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

I have already got the environment variable set up with export all_proxy=proxy.iisc.ernet.in:3128, which is my corporate proxy. I have also set the npm proxy with npm set all_proxy proxy.iisc.ernet.in:3128. Am I setting the wrong variable on npm?

Note: This is a branch from this question.

1

CLTM might be required if your corporate proxy uses NTLM from Microsoft.

After you have cntlm proxy server configured for upstream proxy (which is your corporate proxy), just configure npm to use it:

npm config set proxy http://127.0.0.1:3128
npm config set https-proxy http://127.0.0.1:3128

You must have both http and https. Most package managers work best if proxy is configured in the config file as opposed to enviroment variable which is better for running scripts from command-line.

However, your error code says "connection refused", so this could be outbound firewall, SELinux blocking or wrong port to proxy host. Try telnetting from the same user to see if it works and that the port is open on the proxy.

2
+50

According to the npm config help, it will only derive its proxy settings from the environment

If the HTTPS_PROXY or https_proxy or HTTP_PROXY or http_proxy environment variables are set

(from the https_proxy section, the proxy section only mentions HTTP_PROXY and http_proxy).

The help also doesn't list all_proxy as a configuration key anywhere, just https_proxy and proxy, which explains why your all_proxy settings do not have any effect.

  • I pretty much tried npm set HTTP_PROXY ... with HTTP_PROXY, HTTPS_PROXY, http_proxy and https_proxy, but am getting the same errors. I do not understand as to why npm cannot connect over my proxy. Are there other variables that I need to set? – Sharan Duggirala Jun 10 '16 at 12:24
  • to usually connect to the interent over arch, I set this proxy and then dhcpcd – Sharan Duggirala Jun 10 '16 at 12:25
  • Any update on my comments Wieland? – Sharan Duggirala Jun 11 '16 at 7:56
  • No, that's about as far as I can help you. My next guess would be that the build process as called by yaourt doesn't use the proxy settings from your user profile, but I don't know how to fix that. – Wieland Jun 14 '16 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.