CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

Fix Vercel build — Stripe lazy init #3993

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/fix-vercel-buildmainopened Mar 27, 2026
ccantynzcommented Mar 27, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/48co.v1/pull/44


Fix: Vercel build crashing on STRIPE_SECRET_KEY

Build was failing at Collecting page data because lib/stripe.js threw at import time if the env var wasn't set. Next.js imports all routes during build.

Fix: Lazy initialization via getStripe() — Stripe client only created when a route is actually called, not at build time.

https://claude.ai/code/session_01PBeNmPHrD2W6A2YKZRC7V3

ccantynzcommented Mar 27, 2026

Originally written by @vercel[bot] on GitHub.


The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
48co-ai-pa Error Error Mar 27, 2026 11:30pm

Request Review

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts