LoveAndHappiness LoveAndHappiness - 1 month ago 6
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
node_modules
directory. That makes my
node_modules
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
wamp


My
package.json
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
package.json
file.

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

Answer

Thats the new behavior of npm 3 see npm blog: http://blog.npmjs.org/post/110924823920/npm-weekly-5

Comments