Urgent.News

What's breaking now, across thousands of outlets.

Tech

My site's deploys silently failed for two weeks. I didn't notice

This one is embarrassing, which is exactly why it's worth writing. My portfolio is hosted on Vercel. For roughly two weeks, from about September 10 to September 24 , every deploy failed, and the live site just kept serving an older version. I kept pushing changes. I kept wondering why nothing showed up. The site looked fine, because the old site looked fine. Here's the full post-mortem: what…

This story is about a site deploy that silently failed for two weeks without the author noticing. The site is hosted on Vercel and uses Puppeteer for prerendering. The problem arose because Vercel's npm package manager skips postinstall scripts unless explicitly allowed, which includes Puppeteer's Chrome download. As a result, the prerender step couldn't launch a browser and crashed, causing the deploy to fail due to the non-zero exit code returned by the build command.

To fix this issue, the author created a fallback script that uses @sparticuz/chromium, a version of Chromium designed for serverless environments, and modified the script to skip prerendering and exit with a zero code if no browser is available. The author learned the importance of verifying the live site directly after a deploy and checking for non-zero exit codes in the build process.

He also added a checklist to ensure he questions the essential steps in his build process and has a safe default in case of failure.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Tuesday 20 October →