user310291
user310291

Reputation: 38180

Where does npm store node modules?

I just setup official node.js on windows which includes npm in custom directory d:\myserver\nodejs

I tested npm with

npm install less

it works but I can't see any less directory in node_modules\npm\node_modules subdirectory.

Where could I find it (I guess the name of less module is actually less).

Upvotes: 1

Views: 2824

Answers (2)

Matthias S
Matthias S

Reputation: 3553

Just for further clarification, google brought me here while looking up where global modules are stored (installed via npm install -g ...).

From the documentation

  • Local install (default): puts stuff in ./node_modules of the current package root.
  • Global install (with -g): puts stuff in /usr/local or wherever node is installed.
  • Install it locally if you’re going to require() it.
  • Install it globally if you’re going to run it on the command line.
  • If you need both, then install it in both places, or use npm link.

Upvotes: 1

Darkagelink
Darkagelink

Reputation: 645

under : node_modules

just check where you where pointer "in what directory were you" at the time of the installation

d:\myserver\nodejs -> node_modules

Upvotes: 4

Related Questions