playwright-aws-lambda icon indicating copy to clipboard operation
playwright-aws-lambda copied to clipboard

Avoid path conflicts with chrome-aws-lambda

Open jan-osch opened this issue 4 years ago • 1 comments

Hi! Thank you for all the hard work in this library! 👍

I discovered that this library is using exactly the same paths for chrome binaries as chrome-aws-lambda ( https://github.com/alixaxel/chrome-aws-lambda/blob/master/source/index.js#L166 ). This makes using both libraries in the same lambda a bit cumbersome. I would like to suggest putting the inflated binaries in a directory, for example /tmp/playwright-aws-lambda/chromium, or adding a prefix to the names.

I would be glad to help with a PR to tackle this issue 😃 .

A bonus thing that is present in chrome-aws-lambda, and missing in this library is the ability to await on executablePath (currently I have to inflate the files manually if I don't want to launch the browser).

jan-osch avatar Jul 20 '20 12:07 jan-osch

This is a great find! Thank you for raising this issue. I agree with the idea of adding the project name and browser type to the file path (/tmp/playwright-aws-lambda/chromium). I think that makes the most sense. I thin we'd want to major version this package afterward because it's unclear whether others are actively leveraging that exact path at runtime.

austinkelleher avatar Jul 20 '20 13:07 austinkelleher