Is it normal for Gulp to include so many node_modules when installing Gulp?

I just installed Gulp with the following commands:

npm install --global gulp 

and

 npm install --save-dev gulp 

Everything works fine, except that the node_modules folder is now filled with modules that I have never heard of. All online Gulp tutorials show only the Gulp module in this folder. For me, this is the following:

node_modules folder

Question:

Is it normal for the node_modules folder to have these modules?

Thank you in advance

What tried:

Gulp / node / npm update

Versions:

gulp -v:

[13:45:13] CLI version 3.9.0

[13:45:13] Local version 3.9.0

npm -v: 3.3.9

node -v: v5.0.0

+7
command-line npm gulp
source share
2 answers

this is due to the maximally flat npm 3 dependency tree. Instead of all the node_modules that gulp requires installation in the node_modules folder depending on gulp, they are all installed in the root of node_modules.

https://docs.npmjs.com/how-npm-works/npm3#npm-v3-dependency-resolution

+9
source share

It does not install all dependencies at the root level. It will be installed at the root level if all others depend on one version. It will be installed in directories under node-modules for conflicting versions. Therefore, you should be careful when adding new modules AFTER the initial installation. Always repeat install --save / --save-dev and rm -rf node_modules and npm install again. Otherwise, you may encounter surprises the next time you install from scratch.

-one
source share

All Articles