isaacs/npm — Issue #1595: Proxy issues npm 1.0.102
Author: eliseosoto
Created: 2011-10-25 21:01:43+00:00
State: open

I have a problem with npm 1.0.102, reproducible in Mac OS X Lion and Ubuntu 10.04 LTS

When I do anything that requires network interaction like:

$ npm info express

info it worked if it ends with ok
verbose cli [ 'node', '/usr/bin/npm', 'info', 'express' ]
info using npm@1.0.102
info using node@v0.4.11
verbose config file /Users/BNH378/.npmrc
verbose config file /usr/etc/npmrc
verbose config file /usr/lib/node_modules/npm/npmrc
verbose GET express
verbose raw, before any munging express
verbose url resolving [ 'https://registry.npmjs.org/', './express' ]
verbose url resolved https://registry.npmjs.org/express
verbose etag "6H3G82P8IR56OEX7PS15XO3X4"
ERR! Error: ENODATA, DNS server returned answer with no data
ERR! at IOWatcher.callback (dns.js:74:15)
ERR! Report this *entire* log at:
ERR!
ERR! or email it to:
ERR!
ERR!
ERR! System Darwin 11.2.0
ERR! command "node" "/usr/bin/npm" "info" "express"
ERR! cwd /Users/BNH378
ERR! node -v v0.4.11
ERR! npm -v 1.0.102
ERR! code ENODATA
verbose exit [ 1, true ]

There's clearly a problem with how the proxies are used.

My proxy env vars are setup correctly:

$ export | grep -i proxy
declare -x http_proxy="http://wwwgate0.domain.com:1080"
declare -x https_proxy="http://wwwgate0.domain.com:1080"

And this curl works perfectly:

curl -k https://registry.npmjs.org/express

I have tried unsetting https_proxy and setting it to an empty value to no avail.