How to find out which file NPX runs?

Viewed 591

When you run, say, npx webpack in a terminal, NPX finds a webpack package somewhere and runs it. How to identify the exact location of the binary that NXP runs? I'm looking for a tool like which in NPX.

Maybe there is an option like this (warning, it's not a real code):

$ npx --which webpack
/users/me/my-project/node_modules/.bin/webpack
1 Answers

It seems the which package has got us covered:

$ npx which webpack
/users/me/my-project/node_modules/.bin/webpack
Related