-3

When you install a node module using "npm install -g", where does npm put globally installed files?

1 Answers1

2

You can run npm list -g to see where global libraries are installed.

On Unix systems they are normally placed in /usr/local/lib/node or /usr/local/lib/node_modules when installed globally. If you set the NODE_PATH environment variable to this path, the modules can be found by node.

Windows XP - %USERPROFILE%\AppData\npm\node_modules

Windows 7, 8 and 10 - %USERPROFILE%\AppData\Roaming\npm\node_modules

TrebledJ
  • 8,713
  • 7
  • 26
  • 48
sunice
  • 21
  • 2