92

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

rob
  • 17,995
  • 12
  • 69
  • 94
  • 3
    my gut tells me this would be better to ask on SU or AU (super user or ask ubuntu). – rlemon Jul 18 '14 at 17:24
  • Not sure why you created this, there's plenty of information out there already. – SomeKittens Jul 18 '14 at 17:25
  • 1
    I've had to google this several times and it always takes me a while to track down so I'm just posting it here to make it easier to find – rob Jul 18 '14 at 17:25
  • well, like my original comment stated: this is more about a tool and less about an actual programming problem, so it should be on one of the aforementioned sites. – rlemon Jul 18 '14 at 17:27
  • 6
    https://www.npmjs.org/doc/files/npm-folders.html – Zirak Jul 18 '14 at 17:28

1 Answers1

129

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

HappyFace
  • 3,439
  • 2
  • 24
  • 43
rob
  • 17,995
  • 12
  • 69
  • 94