On OSX should NPM install global packages to:
/usr/local/lib/node_modules
or
/usr/local/share/npm
Path of Global Packages in the system: Global modules are installed in the standard system in root location in system directory /usr/local/lib/node_modules project directory. Command to print the location on your system where all the global modules are installed.
Try this: npm config get prefix will return the path.
The global packages get installed to:
/usr/local/lib/node_modules
and man pages get installed at (if supplied):
/usr/local/share/npm
see this for more information.
The directory will differ depending on whether or not you're using nvm or some other node version manager, and possibly also based on versions of version manager and versions of OSX. Due to the variability here, it may be better to run npm root -g
which will specify the directory npm is using to store your global modules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With