11ty/api-screenshot

chrome-aws-lambda not compatible with Node 16, using a replacement is too large to deploy

stephenjbell opened this issue · 2 comments

After cloning this repo and deploying a new Netlify site, my site function wasn't generating images even when using exactly the same URL syntax as used on 11ty.dev.

Here's my original question on the 11ty Discord forum:
https://discord.com/channels/741017160297611315/1039318195644928060

The problem appears to be chrome-aws-lambda not running correctly on Node 16. LewisDaleUK attempted to submit a PR ( #14 ) using @sparticuz/chromium as a better-maintained replacement, but changing the dependency increases the package size over the 50 MB limit for functions.

Because Netlify is switching all new deploys to Node 16, this effectively means this project can't be used to launch new sites on Netlify.

#14 purports to fix this but I haven’t had a chance to review yet! Soon, sorry! (note the additional comment about build images, though I believe those are AWS Lambda limits—not Netlify build image related)

I went through #13 and added a workaround step to the README to get this working again. I tried to deploy #14 but ran into the same issue as you. I’ve written up the full thread over at #17 and I’d like to coalesce over there! Please subscribe to #17! Thank you!