Laravel "npm install" downloads 30,000 other products

I follow the Laravel docs and wanted to install Elixir to control sass and other preprocessors.

But when I run "npm install" from the laravel root folder, I get:

114.316.724 bytes (220.3 MB on disk) for 35.861 elements

in the node_modules folder!

Please tell me that Elixir or Gulp does not need this ridiculous amount of dependencies, or am I something wrong?

The .json package contains:

{ "private": true, "scripts": { "prod": "gulp --production", "dev": "gulp watch" }, "devDependencies": { "gulp": "^3.9.1", "laravel-elixir": "^5.0.0", "bootstrap-sass": "^3.3.0" } } 
+6
source share
1 answer

The reason npm loads so many elements is because each element in your dependencies also has a package.json file, and more dependencies are declared in each of these files. This creates a complex dependency tree.

There is no way around the fact that it takes 200 MB of packages to run the elixir, although the main Laravel team now recommends yarn as your package manager ( https://yarnpkg.com/lang/en/ ) to greatly speed up your node-fu.

I personally see 5-10x speed in package installations.

0
source

All Articles