BackstopJS icon indicating copy to clipboard operation
BackstopJS copied to clipboard

Core install? (integrated, but avoid puppeteer install)

Open MalcolmDwyer opened this issue 6 years ago • 2 comments

TLDR: I want to have backstopjs in my project's package.json, but still be able to avoid the chromium download that usually happens (via puppeteer) on install.

Standard install of backstop with yarn add backstopjs will include the puppeteer installation, and that will in turn include the chromium download. On a CI system (or in certain corporate setups) this will fail because of the direct download. The workaround ("Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.") is fine for a one-off developer setup, and fine if you don't need to have backstopjs integrated with the project.

I'm trying to find a way to integrate backstop into a project (shared among various developers on Mac and Windows, and always behind the corporate wall), without requiring a bunch of manual setup for each person.

Basically, I can't just add backstopjs to the package.json devDependencies because it will break the yarn install for the whole project. And if I instead provide instructions (or an npm script) for the global install of backstopjs (with the SKIP...DOWNLOAD environment), then I can't use backstop in an integrated way.

scripts: {
  "backstop:install": "cross-env PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true yarn global add backstopjs",
}

Best solution I have, but doesn't allow for project integrations

I noticed that puppeteer has a default install, but they also have a puppeteer-core install that skips the chromium download. Would it be possible to get a backstop-core package that works similarly? Or can anyone recommend any other way to handle this? - Thanks

MalcolmDwyer avatar Oct 29 '18 19:10 MalcolmDwyer

Please!!!

Now with playwright the installation is huge.

masi avatar Mar 09 '22 15:03 masi

I also agree. In our project we use playwright, so we really don't want to have extra dependencies (like pupeteer) in there.

ironicnet avatar Jan 03 '23 09:01 ironicnet