Resolve the path of a globally installed module
$ npm install resolve-global
$ npm install --global cat-names
const resolveGlobal = ;console;//=> '/usr/local/lib/node_modules/cat-names'
Throws if the module can't be found.
undefined instead of throwing if the module can't be found.
What you would use in
- import-global - Import a globally installed module
- resolve-from - Resolve the path of a module from a given path
- import-from - Import a module from a given path
- is-installed-globally - Check if your package was installed globally
- global-dirs - Get the directory of globally installed packages and binaries
MIT © Sindre Sorhus