nextjs-notion-starter-kit
nextjs-notion-starter-kit copied to clipboard
Vercel social images failing to generate on live
This references "Vercel social images not found, failing to generate" #310
Fix doesn't work for me, changing the engine/node version in package.json throws an error at vercel --prod
time.
I think this is very complicated issue.
This project depends on next-api-og-image
which has peer dependency of chrome-aws-lambda
.
The problem is, size of chrome-aws-lambda
increases of each 'releases', and it exceedes Vercel's size limit of 50MB. You might get error saying Warning: Max serverless function size of 50 MB compressed or 250 MB uncompressed reached
in Vercel's build log. At the point of reaching 50MB size limit, no further serverless function are 'processed'. So no OG/Twitter Image is generated.
Vercel already knows about hitting 50MB size limit and there is discussion about this.
Also, chrome-aws-lambda
doesn't support Node.js 16.x and the project is kind of dead. Author of chrome-aws-lambda
didn't reponded for months. There is alternative of chrome-aws-lambda
which is just fork of it.
So, I consider this as dependency bug.
chrome-aws-lambda
'ignores' PR which add support for Node.js 16.x and it has problem with Vercel which makes serverless function size exceedes 50MB limit.
EDIT: There is note about 50MB size limit on next-api-og-image
's README. And nextjs-notion-starter-kit
is already implemented the solution. Hmm...