Where do global npm packages get installed on Ubuntu

rob picture rob · Jul 18, 2014 · Viewed 58k times · Source

Where is the default global node_modules folder on Ubuntu. For example where would this get installed: npm install -g gulp

Answer

rob picture rob · Jul 18, 2014

Run npm root -g to see the location, which varies. A common path is /usr/local/lib/node_modules.

For more info see the npm docs on Global vs. Local installation