Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out which file NPX runs?

Tags:

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
like image 599
Finesse Avatar asked Oct 18 '19 02:10

Finesse


1 Answers

It seems the which package has got us covered:

$ npx which webpack
/users/me/my-project/node_modules/.bin/webpack
like image 70
Blake Regalia Avatar answered Sep 30 '22 01:09

Blake Regalia