zkat / npx

execute npm package binaries (moved)
https://github.com/npm/npx
Other
2.63k stars 105 forks source link

`npx uglify-js` and `npx uglifyjs` fails #97

Closed ljharb closed 7 years ago

ljharb commented 7 years ago

In 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

zkat commented 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.

ljharb commented 7 years ago

ah, thanks, i'm using the one that came with stock latest node.

Using the package name only is perfectly fine, thanks!!