Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
error-handler: added er.parent to ETARGET error
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass authored and othiym23 committed Feb 27, 2015
1 parent 8ac6f21 commit 9748d5c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/utils/error-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 9748d5c

Please sign in to comment.