LoveAndHappiness LoveAndHappiness - 1 year ago 83
Node.js Question

"npm install" installs all dependencies in node_modules directory, instead of having them nested

I need to know if the following behavior is normal.

When I

npm install
, each package from my package.json and the dependencies, don't get installed nested anymore, but each dependency is installed in the
directory. That makes my
directory blown and look like this:

Screenshot of node_modules directory

This happened since I updated npm and node.

Now I run:

npm -v 3.3.6
node -v 4.2.1
python 2.7
windows 7

file looks like this:

"private": true,
"devDependencies": {
"gulp": "^3.8.8"
"dependencies": {
"laravel-elixir": "^3.0.0",
"bootstrap-sass": "^3.0.0"

It's the standard laravel

Is there a way to have nested directories again, because I don't like such a blown article with over 100 sub directories.

Answer Source

Thats the new behavior of npm 3 see npm blog:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download