which - nodef/extra-npm GitHub Wiki

Locates a program or locally installed node module executable.

Similar: which, validate, rev-parse.


enpm which <command> [options]
# command: name of program / node module
# -> path of program / node module
# -> -1 otherwise (error)

# Options:
# --help:   view this help
# --silent: enable showing only -1 on error (0)

# Environment variables:
$NPM_SILENT # enable showing only -1 on error (0)
## Get path of globally installed "googletts"
$ npm install -g extra-googletts
$ enpm which googletts

# C:\Users\wolfram77\AppData\Roaming\npm\googletts.CMD


## Get path of locally installed "stillvideo"
$ npm install extra-stillvideo
$ enpm which stillvideo

# C:\Base\Forge\wikipedia-tts\node_modules\.bin\stillvideo.CMD


## "youtubeuploader" isn't installed locally or globally
$ enpm which youtubeuploader --silent

# -1


References

⚠️ **GitHub.com Fallback** ⚠️