Skip to content

Having different puppeteer version in a project installs 6 additional browser instances #89

@timocov

Description

@timocov

If for whatever reason in your repo you're using puppeteer different version than memlab is using, you can ended up with having 7 downloaded chromium instances, which uses around 2.5gb of disk space instead of less than 500mb, and takes time to download all of them (even though they all are the same):

$ du -h --max-depth 3 ./ | sort -h | tail -12
7.8M    ./node_modules/puppeteer-core
8.3M    ./node_modules/@babel
423M    ./node_modules/@memlab/api
423M    ./node_modules/@memlab/e2e
423M    ./node_modules/@memlab/heap-analysis
423M    ./node_modules/memlab
423M    ./node_modules/memlab/node_modules
424M    ./node_modules/@memlab/cli
424M    ./node_modules/@memlab/core
2.1G    ./node_modules/@memlab
2.6G    ./
2.6G    ./node_modules

image

Reproduction

Use this package.json and run npm install in the folder with it:

{
  "private": true,
  "dependencies": {
    "memlab": "^1.1.40",
    "puppeteer": "^21.0.3"
  }
}

Possible solution

Instead of having puppeteer in the dependencies memlab should use puppeteer-core instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions