Closed ljharb closed 7 years ago
npx has supported this since npx@8.0.0
. So, I'm gonna close this as fixed ;)
Note that this is also why npx <gist-url>
works!
I have confirmed manually that npx uglify-js index.js
does, indeed, work. The inverse (trying to call a binary instead of the package name, when the binary doesn't exist), is unlikely to ever be supported unless the registry somehow starts keeping track of binary names for all packages, which would be further complicated by the fact that multiple packages might be using the same binary names, etc.
ah, thanks, i'm using the one that came with stock latest node.
Using the package name only is perfectly fine, thanks!!
npx uglifyjs input.js
reportsnot found: uglify-js
npx uglify-js input.js
reportsnot found: uglify-js
npm install uglify-js && npx uglifyjs input.js
worksIn other words, it seems that when the package name and the "bin" name are different, it breaks?
It'd be great if when there was only one "bin", it would quietly use it, and when there was more than one "bin", it prompted me asking which one i wanted to use :-D