Fix frontend build without Supabase env

🟢 open · #173 · Open-Legal-Products/mike ← lawyered0/mike · opened 1mo ago by lawyered0 · +58-36 across 3 files · ↗ on GitHub

From the PR description

Summary

  • avoid constructing the Supabase browser client with empty env values during static prerender
  • make token validation fail closed with a clear log when Supabase env is missing
  • pin Turbopack's root to the frontend app to avoid workspace-root misdetection

Verification

  • npm run build --prefix backend
  • npm run build --prefix frontend

Notes

  • This fixes a fresh-checkout build failure where npm run build --prefix frontend crashed on /account/api-keys with supabaseUrl is required before any runtime Supabase call was made.

Our analysis

Fix fresh-checkout frontend build failure when Supabase env is absent — read the full analysis →

Think the analysis missed something the PR description covers?

Capture this PR into my fork

Download a Markdown prompt that tells Claude how to port every commit in this PR into your working tree. Run it via claude -p < capture-pull-173.md from inside the repo you want the changes in.

⬇ Download capture-pull-173.md