5 MIN READ

Three bugs in an afternoon — and why we still bet on new tech

We upgraded emdash CMS from 0.4 to 0.6 on msale.com. Three things broke in fifteen minutes, and everything was fixed within the hour. Here's why.

Stylized terminal panel showing three errors — require_dist build error, raw JSON on an invite link, and a magic link pointing at the old workers.dev URL — followed by a green deploy line.

Yesterday afternoon we upgraded emdash CMS from 0.4 to 0.6 on this site. Before the upgrade, everything was green. After the upgrade, three things were broken. An hour later, everything was green again. That's the whole story — and it's why we still recommend new tech to our clients.

What broke

The first thing: invite links in email. The user clicks the link in their inbox and lands on a raw JSON response in the browser instead of a login UI. Not ideal.

The second thing: magic-link emails for sign-in. Even after we cut over to msale.com, the links still pointed at the old workers.dev URL. Emdash had cached the origin in our D1 database at first boot, with no auto-update.

The third thing: the build failed. require_dist is not a function — a cryptic error from Cloudflare's Vite plugin with no trail back to our own code.

Why it was quick to fix

The invite bug had been fixed upstream three weeks ago, in emdash 0.5. We were sitting on 0.4. Our fault, not emdash's. Claude Code pulled up the changelog and found the relevant PR in seconds. We bumped versions, tested, done.

The magic-link URL was one wrangler d1 execute command away. We updated options.emdash:site_url in D1, redeployed, done.

The Vite error was a known Astro issue — Astro 6 uses Vite 7, but Cloudflare's plugin picks up Vite 8 from node_modules and the two collide. Claude found the GitHub issue in a single search and pointed to overrides.vite: ^7 as the workaround. Three lines in package.json, clean reinstall, build green again.

What we take away

New tech might cost you time on breakage. It doesn't have to. With modern AI tooling — Claude Code, Codex, and the like — the gap between "unknown error message" and "fix deployed" is short. Not zero, but short.

Our own lesson: we should have updated earlier. Emdash 0.5 was out well before we realised the fix we needed was already on the shelf. The rule is simple enough — always run the latest stable, watch the release notes — but with how fast new tech moves, that rule needs discipline and tooling to hold.

We still say yes to new tech for our clients. The upside — better stack, faster delivery, more flexible product — beats the risk when you combine it with good tooling and an honest habit of staying current.