Where do global npm packages get installed on Ubuntu

Javascriptnode.jsUbuntuNpmUbuntu 14.04

Javascript Problem Overview


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

Javascript Solutions


Solution 1 - Javascript

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionrobView Question on Stackoverflow
Solution 1 - JavascriptrobView Answer on Stackoverflow