T
T
tikos2016-02-04 16:16:36
npm
tikos, 2016-02-04 16:16:36

Why are there many different folders in node_modules?

I updated nodejs and why after I try to put any module on an empty project, a bunch of left folders are installed with it, is this after the update? Or did I do something wrong, that now a bunch of unclear what is being installed?
For example, I installed only express and with it a lot of everything:
https://gyazo.com/83561db44ab70108404dce39978118f9

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Korolev, 2016-02-04
@tikos

Each module has its own dependencies. Previously, they were placed in the node_modules folder of the corresponding module, and starting from some recent version, all modules are installed in the root node_modules folder. This reduces the number of files in the project, its size and eliminates problems associated with the limitation on the length of the file name in Windows.

A
Alex, 2016-02-04
@streetflush

The new npm puts all dependencies on the root. and dependency dependencies.
They used to load into subfolders of subfolders of subfolders.....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question