Reputation: 5924
I recently started a new node project and ran npm install *name* --save
for both express and nodemon and noticed that 20-30 folders appear in my node_modules folder related to the two packages instead of just express and nodemon. This has never happened when I have run this command with previous projects. Is there any reason why this is happening now?
I expected my node_modules folder to only have "express" and "nodemon"
npm version: 3.3.6 node version: 5.0.0
Upvotes: 1
Views: 1222
Reputation: 46
Stumbled upon your post with a Google Search and thought I'd link the answer :
Your dependencies will now be installed maximally flat. Insofar as is possible, all of your dependencies, and their dependencies, and THEIR dependencies will be installed in your project's node_modules folder with no nesting. You'll only see modules nested underneath one another when two (or more) modules have conflicting dependencies.
See npm@3's release notes.
Upvotes: 3