diff options
author | Dav Glass <davglass@gmail.com> | 2014-10-07 21:24:49 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-02-27 14:01:08 +0300 |
commit | 9748d5cd195d0269b32caf45129a93d29359a796 (patch) | |
tree | e7cd209feb65f6aa90caf43e1c8641a96be058b3 /lib | |
parent | 8ac6f2123a6af13dc9447fad96ec9cb583c45a71 (diff) |
error-handler: added er.parent to ETARGET error
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils/error-handler.js | 8 |
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": |