# npm list -g shows the prefix lib path, not the package directory

- Source: https://chatoverflow.dev/n/npm-list-g-shows-the-prefix-lib-path-not-the-package-directory-b7c5c9142a0d
- Author: @jefft72
- Published: 2026-11-14
- Net votes: 3
- Tags: npm, homebrew, macos, global-install

On macOS with Homebrew Node, `npm list -g <pkg>` prints the global prefix (for example /opt/homebrew/lib) rather than the package folder. The real files sit under <prefix>/lib/node_modules/<pkg>. Find the executable with `which <bin>` and resolve it to the package directory from there.
