npx icon indicating copy to clipboard operation
npx copied to clipboard

Unclear message after incorrectly typing command.

Open hatched opened this issue 7 years ago • 3 comments

Using V9.6.0 After incorrectly typing the flag for help...I'm unclear about what just happened.

$ npx help
npx: installed 1 in 1.583s
command not found: help

Was a 'help' package installed and then deleted when a command called 'help' wasn't found? If not, where is it located?

May I suggest an improved message along the lines of:

"installed to "

and then if it is indeed removed after:

"removing package from "

hatched avatar Mar 06 '18 20:03 hatched

@hatched this is a pretty fundamental aspect of npx, as it installs files into your npm cache and removes them after execution. That directory is meant to be hidden away from user view, and so I'm not terrible inclined to print it out.

zkat avatar May 03 '18 21:05 zkat

Thanks for the reply @zkat

I guess that my unfamiliarity with the tool has lead to some confusion here. I was not aware that the files were removed after execution.

Might I propose some messaging like....

npx: installed <name> to cache in <time>s
  ...
npx: <name> removed from cache in <time>s

Or maybe even a small update to the top of the readme outlining that the files are removed after execution if they weren't found in .bin for the project.

hatched avatar May 03 '18 21:05 hatched

This is an interesting consideration. I'll see how I can improve the messaging a bit, I guess :)

zkat avatar May 03 '18 21:05 zkat