Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDav Glass <davglass@gmail.com>2014-10-07 21:24:49 +0400
committerForrest L Norvell <forrest@npmjs.com>2015-02-27 14:01:08 +0300
commit9748d5cd195d0269b32caf45129a93d29359a796 (patch)
treee7cd209feb65f6aa90caf43e1c8641a96be058b3
parent8ac6f2123a6af13dc9447fad96ec9cb583c45a71 (diff)
error-handler: added er.parent to ETARGET error
-rw-r--r--lib/utils/error-handler.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/utils/error-handler.js b/lib/utils/error-handler.js
index 12c6dd407..de12c6363 100644
--- a/lib/utils/error-handler.js
+++ b/lib/utils/error-handler.js
@@ -304,11 +304,15 @@ function errorHandler (er) {
break
case "ETARGET":
- log.error("notarget", [er.message
+ var msg = [er.message
,"This is most likely not a problem with npm itself."
,"In most cases you or one of your dependencies are requesting"
,"a package version that doesn't exist."
- ].join("\n"))
+ ]
+ if (er.parent) {
+ msg.push("\nIt was specified as a dependency of '"+er.parent+"'\n")
+ }
+ log.error("notarget", msg.join("\n"))
break
case "ENOTSUP":