i have one thing to say: F* LOL . i thought this would be a simple 20 min vibe coded calendar app but i guess not..
A log of findings, results, and lessons learned
The task was to run Puppeteer inside a Next.js serverless function on Vercel. The function needed to scrape event data from a Luma page, process it into a structured schema, and feed it into a calendar UI. Could not use Luma API because this is a calendar that many hosts submit events too and LUMA will only return events that are owned and managed by your calendar which causes issues if hosts are charging for their events… ( i think this is the dumbest design pattern ever!!!)
Running Puppeteer locally was straightforward, but deploying to Vercel introduced a series of issues related to missing Chromium binaries, mismatched versions, serverless file system constraints, and concurrency behavior.
This document records the debugging journey, the hypotheses that were tested, and the eventual resolution.
The first errors looked like this:
Could not find Chrome (ver. 140.0.7339.82).
The natural assumption was that Puppeteer didn’t have access to a valid Chromium binary in the serverless environment. Locally, this was fixed by installing Chrome for Testing:
npx puppeteer browsers install chrome
That solved the local dev issue, but the deployment still failed. This led to exploring alternatives like chrome-aws-lambda
, which turned out to be deprecated and incompatible with newer Next.js runtimes.
The next realization was that local development and serverless production require different setups.
puppeteer
package (bundled Chromium).