elm-lang / elm-platform

Bundle of all core development tools for Elm
BSD 3-Clause "New" or "Revised" License
762 stars 125 forks source link

npm install fails with "read ECONNRESET" with configured corporate proxy #242

Closed touwwouter closed 6 years ago

touwwouter commented 6 years ago

I am trying to install Elm via npm and run into network errors (see output below) that I only experience in the corporate network with proxy (outside the network installation completes without errors). I think I configured npm correctly to use the proxy server. Environment variables http(s)_proxy / HTTP(S)_PROXY are understood by npm and I also explicitly instructed npm using npm config set (https-)proxy. Installation of other packages (e.g. bower) goes fine. This issue is different from #236, where the error is about EACCESS rather than ECONNRESET.

Accessing https://dl.bintray.com/elmlang/elm-platform/0.18.0/linux-x64.tar.gz using wget goes fine.

I also tried strict-ssl = false, registry = "http://registry.npmjs.org/" without success. Same error wity npm/6.1.0 + node/v10.4.0.

Any suggestions to fix this issue are highly appreciated.

Output:

$ npm install elm

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

> elm@0.18.0 install /tmp/test/node_modules/elm
> node install.js

Error communicating with URL
https://dl.bintray.com/elmlang/elm-platform/0.18.0/linux-x64.tar.gz Error:
tunneling socket could not be established, cause=read ECONNRESET
npm WARN enoent ENOENT: no such file or directory, open
'/tmp/test/package.json'
npm WARN test No description
npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elm@0.18.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the elm@0.18.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.

Configuration on Ubuntu 16.04:

$ npm config get

; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.1.0 node/v8.11.2 linux x64"

; userconfig /home/user/.npmrc
https-proxy = "http://aaa.bbb.ccc.dd:pppp/"
prefix = "/home/user/.npm-global"
proxy = "http://aaa.bbb.ccc.dd:pppp/"
registry = "https://registry.npmjs.org/"
strict-ssl = true

; node bin location = /usr/bin/node
; cwd = /tmp/test
; HOME = /home/user
; "npm config ls -l" to show all defaults.
touwwouter commented 6 years ago

I don't know how, but this issue has been resolved. I did not change anything.