Glen Selle
Glen Selle

Reputation: 3956

Does NPM load certain modules after it is installed (for its own use)?

I had some issues with NPM so I decided to simply uninstall Node, NPM & NVM and then reinstall everything on Mac OS X 10.8. After following various guides and Stackoverflow questions I was pretty sure I had gotten rid of everything. But to my surprise after I first installed NVM and then Node (which installed NPM for me) I couldn't understand why running npm -g ls shows lots of different modules which, after looking them up on the NPM registry, look to be very basic helpers and boilerplate modules which other more advanced modules build on. Here is the entire list of modules it prints out:

unknownd8a25e8b001d:~ [username]$ npm -g ls
/Users/[username]/.nvm/v0.10.18/lib
└─┬ [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ └─┬ [email protected]
  │ │   └── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ ├── [email protected]
  │ │ ├── [email protected]
  │ │ └── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ ├── [email protected]
  │ │ └── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  └── [email protected]

So my question is, does NPM install various global modules for its own use when it is installed? It does look, from the indenting, as though these are modules npm uses because they're nested underneath [email protected] and with Finder I can see how NPM looks to have these within its own node_modules folder.

Upvotes: 0

Views: 211

Answers (1)

hexacyanide
hexacyanide

Reputation: 91639

The Node Package Manager (NPM) itself is a module, which yes, does have dependencies. Therefore the answer to your question is yes, except that the modules are installed as dependencies, not globally. The module NPM itself is the global module.

Upvotes: 1

Related Questions