isaacs/npm — Issue #1761: npm install command fails with getaddrinfo ENOENT
Author: lorenjerickson
Created: 2011-11-23 16:40:41+00:00
State: open

I am working with node/npm on windows 7 x64. I am having several different problems with npm commands failing. The first is that npm install commands fail with getaddrinfo ENOENT. The debug log for that failure and my npm config are copied below. Another example is that when running npm search it fails with an ERR! getaddrinfo OK. Likewise, when I just run npm to get the man page, I get "ERR! Error; ENOENT, the operation completed successfully".

I started working with npm yesterday behind a corporate firewall and I was able to get a few packages installed. However I just noticed that the dependencies for express were not installed. Today I am outside the office so I cleared out my proxy configs for npm, but now I'm getting this and other errors. When I installed npm I had to resort to the 'sudo node ./cli.js install -g' command as documented here http://npmjs.org/doc/README.html#Installing-on-Windows-Experimental, since I do not have make or curl outside of cygwin.

Something is majorly messed up here. Any ideas?

### npm install express

info it worked if it ends with ok
verbose cli [ 'C:\\Users\\######\\bin\\node\\\\node.exe',
verbose cli 'C:\\Users\\######\\bin\\node\\node_modules\\npm\\bin\\npm-cli.js',
verbose cli 'search',
verbose cli 'mongoose' ]
info using npm@1.0.106
info using node@v0.6.0
verbose config file C:\Users\######\.npmrc
verbose config file C:\Users\######\bin\etc\npmrc
verbose config file C:\Users\######\bin\node\node_modules\npm\npmrc
verbose mkdir (expected) error ENOENT, The operation completed successfully.
verbose mkdir (expected) error 'C:\Users\######\npm-cache\-'
verbose mkdir (expected) error ENOENT, The operation completed successfully.
verbose mkdir (expected) error 'C:\Users\######\npm-cache\-\all'
verbose mkdir done: C:\Users\######\npm-cache\-\all 755
WARN Building the index for the first time, please be patient
verbose GET /-/all
verbose raw, before any munging /-/all
verbose url resolving [ 'http://registry.npmjs.org/', './-/all' ]
verbose url resolved http://registry.npmjs.org/-/all
ERR! Error: getaddrinfo OK
ERR! at errnoException (dns.js:31:11)
ERR! at Object.onanswer [as oncomplete] (dns.js:140:16)
ERR! Report this *entire* log at:
ERR!
ERR! or email it to:
ERR!
ERR!
ERR! System Windows_NT 6.1.7601
ERR! command "C:\\Users\\######\\bin\\node\\\\node.exe" "C:\\Users\\######\\bin\\node\\node_modules\\npm\\bin\\npm-cli.js" "search" "mongoose"
ERR! cwd C:\Users\######\bin\node
ERR! node -v v0.6.0
ERR! npm -v 1.0.106
ERR! code OK
verbose exit [ 1, true ]

### npm config list

; cli configs

; userconfig C:\Users\#######\.npmrc
registry = "http://registry.npmjs.org/"

; node install prefix = undefined
; node bin location = C:\Users\#######\bin\node\node.exe
; cwd = C:\Users\#######\bin\node
; HOME = undefined
; 'npm config ls -l' to show all defaults.