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

Enable puppeteer and Chromium to work with latest versions of Node. #14

Open
wants to merge 1 commit into
base: v1
Choose a base branch
from

Conversation

LewisDaleUK
Copy link

Update puppeteer-core and replace chrome-aws-lambda with @sparticuz/chromium

The current code will only work with Node 12, meaning it can't be deployed out of the box as Netlify uses Node 16.

The chrome-aws-lambda package hasn't been maintained in over a year, https://github.com/sparticuz/chromium is an alternative that provides the same functionality.

This is now able to be auto-deployed by Netlify and run out-of-the-box again

Sources:

@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for eleventy-api-screenshot failed.

Name Link
🔨 Latest commit 804ed93
🔍 Latest deploy log https://app.netlify.com/sites/eleventy-api-screenshot/deploys/6364ebbfe9e4db00088a0859

@LewisDaleUK
Copy link
Author

Ah okay, looks like the Chromium package includes the Chromium binary and means the bundle is 60mb. Interestingly, it deploys without issue for me - could be because my deploy is using Ubuntu Focal, whereas yours is using Xenial

@homotechsual
Copy link

Trying the changes in this test on Netlify and it just times out on each request.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants