ReLaXed icon indicating copy to clipboard operation
ReLaXed copied to clipboard

Feat: Choose Chromium version to install

Open benperiton opened this issue 7 years ago • 3 comments

Would it be possible to set the Chromium version used with Puppeteer via this package? It seems that although Puppeteer provide a way to set the Chromium version during install, they don't want to use ENV vars in the actual code (https://github.com/GoogleChrome/puppeteer/pull/2491#issuecomment-386152557), so it needs to be set when creating the browser.

e.g.

const browserFetcher = puppeteer.createBrowserFetcher();
const revision = browserFetcher.revisionInfo(process.env.PUPPETEER_CHROMIUM_REVISION);
const browser = await puppeteer.launch({executablePath: revisionInfo.executablePath})

This would provide a way to pin Chromium to a version that works for individual needs - #17 for instance - and could help in the future for any breaking changes in Chromium.

benperiton avatar May 03 '18 07:05 benperiton

This would also be good for #47 - puppeteer also accepts a env to not download Chromium. I'll try and find time next week to update the pull request with a better way to use other versions if needed for advanced use.

benperiton avatar May 11 '18 11:05 benperiton

cross-env or something similar can be probably used.

DanielRuf avatar May 11 '18 11:05 DanielRuf

@DanielRuf @benperiton Similar issue, trying to override the executable path for chromium. At work we are behind a firewall and already have an executable, so would like to provide the path instead of downloading chromium. Puppeteers api allows for this, is there any way to pass those configurations to relaxedjs?

https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerexecutablepath

thedewpoint avatar Jun 26 '18 17:06 thedewpoint