Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better error message for cygwin DNS issue

  • Loading branch information...
commit 792280a9f9de249a71925a26026e5d0459514d49 1 parent 1c992a9
isaacs isaacs authored
Showing with 15 additions and 4 deletions.
  1. +14 −3 cli.js
  2. +1 −1  package.json
17 cli.js
View
@@ -91,9 +91,20 @@ function errorHandler (er) {
return rm(npm.tmp, function (er) { process.exit(0) })
}
log.error(er)
- log.error("try running: 'npm help "+command+"'")
- log.error("Report this *entire* log at <http://github.com/isaacs/npm/issues>")
- log.error("or email it to <npm-@googlegroups.com>")
+ if (er.message.trim() === "ECONNREFUSED, Could not contact DNS servers") {
+ log.error(["If you are using Cygwin, please set up your /etc/resolv.conf"
+ ,"See step 3 in this wiki page:"
+ ," http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-%28Windows%29"
+ ,"If you are not using Cygwin, please report this"
+ ,"at <http://github.com/isaacs/npm/issues>"
+ ,"or email it to <npm-@googlegroups.com>"
+ ].join("\n"))
+ } else {
+ log.error(["try running: 'npm help "+command+"'"
+ ,"Report this *entire* log at <http://github.com/isaacs/npm/issues>"
+ ,"or email it to <npm-@googlegroups.com>"
+ ].join("\n"))
+ }
rm(npm.tmp, function (er) { process.exit(1) })
}
2  package.json
View
@@ -1,6 +1,6 @@
{ "name" : "npm"
, "description" : "A package manager for node"
-, "version" : "0.1.27-6"
+, "version" : "0.1.27-7"
, "homepage" : "http://npmjs.org/"
, "author" : "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)"
, "contributors" :
Please sign in to comment.
Something went wrong with that request. Please try again.