Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify downloading multiple browsers #5743

Closed
timvandermeij opened this issue Apr 26, 2020 · 7 comments
Closed

Simplify downloading multiple browsers #5743

timvandermeij opened this issue Apr 26, 2020 · 7 comments

Comments

@timvandermeij
Copy link

I'm introducing Puppeteer for Mozilla's PDF.js project in mozilla/pdf.js#11807. One can use the PUPPETEER_PRODUCT environment variable to control which browser is downloaded, but npm install will always install either Chrome or Firefox. Is it possible to change this so that, for example, PUPPETEER_PRODUCT accepts a comma-separated list instead?

Now we install Puppeteer, which downloads Chrome, and have a separate post-install step that re-runs the Puppeteer installation script with PUPPETEER_PRODUCT=firefox to download Firefox too. This feels hacky.

@linquize
Copy link

I suggest to add a script to download an additional browser after the first npm install puppeteer is called.

@jackfranklin
Copy link
Collaborator

We have to do this same hack in our CI too and I agree it would be nicer to not do this.

I like the idea of the install script supporting a list of browsers. WDYT @mathiasbynens ?

@mathiasbynens
Copy link
Member

The plan is for npm i puppeteer to auto-install all supported browsers. The only reason that’s not happening yet for Firefox because its support is still experimental. cc @mjzffr

@linquize
Copy link

npm install puppeteer

This will install puppeteer and download chromium by default.
Chromium will be put in node_modules/puppeteer/.local-chromium

cd node_modules/puppeteer
PUPPETEER_PRODUCT=firefox node install.js

This will download firefox.
Firefox will be put in node_modules/puppeteer/.local-firefox

@tukusejssirs
Copy link

I my opinion, browsers should be separate packages and no browser should be installed by default. That way one could install one, many or all browsers supported by Puppeteer.

It would also solve the issue with browser versions. One might want to install the latest version, others an exact version they have tested with their app.


Related: #6680, #6586, #6894, #6371, #6283

@stale
Copy link

stale bot commented Jun 24, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 24, 2022
@stale
Copy link

stale bot commented Jul 24, 2022

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!

@stale stale bot closed this as completed Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants