How to find out which file NPX runs?
Asked Answered
M

1

14

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
Maltha answered 18/10, 2019 at 2:22 Comment(0)
S
14

It seems the which package has got us covered:

$ npx which webpack
/users/me/my-project/node_modules/.bin/webpack
Significant answered 11/10, 2020 at 23:24 Comment(1)
Seems like it works and is more useful than just which.Maltha

© 2022 - 2024 — McMap. All rights reserved.