npm prefix -g

Category: Node.js & npm/yarn

npm prefix -g

Print the global npm prefix directory

Shows where globally installed packages live, the directory whose bin folder npm adds to your PATH. On this machine it is the nvm-managed Node directory. Install tools there with npm install -g and inspect them with npm ls -g --depth=0.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.