D
D
Dmitry Khristoev2019-07-26 10:00:41
Chromium
Dmitry Khristoev, 2019-07-26 10:00:41

Why does installing packages install Chromium?

Hello! I am working with gulp, here is the list of packages to install

"bootstrap": "^4.3.1",
"browser-sync": "^2.26.7",
"critical": "^1.3.4",
"emitty": "^1.4.0",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^6.1.0",
"gulp-clean-css": "^4.2.0",
"gulp-email-builder": "^3.0.0",
"gulp-if": "^3.0.0",
"gulp-load-plugins": "^2.0.0",
"gulp-plumber": "^1.2.1",
"gulp-pug": "^4.0.1",
"gulp-rename": "^1.4.0",
"gulp-sass": "^4.0.2",
"gulp-sourcemaps": "^2.6.5",
"gulp-tinypng": "^1.0.2",
"gulp-wait2": "0.0.5",
"normalize-scss": "^7.0.1",
"rimraf": "^2.6.3"

I work from home on Windows and Linux. I noticed that during installation it additionally downloads Chromium, on Windows it is about 150 mb, on Linux about 110. It downloads and puts it in a local folder. In addition, he downloads some puppeteer.
That is, every time you run npm install in the project, it downloads Chromium.
5d3aa42024ef1665304248.png
Can you explain why it does this and can it be turned off? Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Khristoev, 2019-07-26
@Haoss

Analyzed all installed packages. It turns out that all this pulls the critical package, it has penthouse in its dependencies, it has Puppeteer, which puts Chromium at 315 mb in the .local-chromium critical folder, blows up the
node_modules folder from 108 mb without it, up to 445 mb.
DECISION. Adding
"scripts": {
"preinstall": "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm i puppeteer",
}
to package.json stops Chromium downloading, but disables the ability to run a task to create critical styles, writes Error: Chromium revision is not downloaded.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question