npm / node-which

Like which(1) unix command. Find the first instance of an executable in the PATH.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Unable to invoke `which` from Windows 11's Terminal

DevDengChao opened this issue · comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

image

Expected Behavior

which should be registered to PATH after installation.

Steps To Reproduce

  1. Install latest lts Node.js with nvm for windows
  2. Open the Terminal app
  3. Install the module by npm i -g which
  4. Invoke which which and you will see something like above.

Environment

  • npm: 9.5.1
  • Node: 18.16.0
  • OS: Windows 11 22H2 22621.1555
  • platform: DIY Windows desktop
commented

After comparing uuid's package.json and which's package.json, I found that which registered its binaray as node-which

https://github.com/npm/node-which/blob/main/package.json#L12

image

image

commented

I found the commit which renamed the bin from which to node-which: d65012c

Maybe the readme should have an update.