cli
cli copied to clipboard
Special error for missing command
When a dependency requires git
, but git
cannot be found, npm
currently logs the missing file path with a standard file not found error. This behavior has led to confusion among some users, resulting in issues being reported against nodejs/node and nodejs/help.
I suggest enhancing the error messaging to provide clearer guidance. Specifically, when npm
attempts to execute a command and the corresponding file cannot be found, the error message should IMO explicitly state this. The enhanced message could look something like this:
The '[command]' command could not be found at '[file path]'. Please ensure that '[command]' is installed at the specified path and is executable by the current user.