Local dev: blank `STRIPE_SECRET_KEY` in `.env.example` causes 500 on workspace API routes
apps/web/.env.example has STRIPE_SECRET_KEY= with no value. If you set up local dev by copying that file as the guide instructs, every workspace route returns a 500.
⨯ Error: Neither apiKey nor config.authenticator provided
at __TURBOPACK__module__evaluation__ (lib/stripe/index.ts:4:23)
GET /api/workspaces/<slug> 500apps/web/lib/stripe/index.ts:4 builds the client at module scope, so an empty key throws when the module is imported rather than when Stripe is called. A one-line fallback would fix the immediate problem:
-export const stripe = new Stripe(`${process.env.STRIPE_SECRET_KEY}`, {
+export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY || "sk_test_placeholder", {That way a missing key degrades the eventual Stripe call instead of breaking imports in routes that never touch billing. Building the client lazily, as stripeAppClient does just below it, would remove the coupling entirely.
That's just the smallest change I could see, and you may have a better sense of where this belongs. Glad to help with a fix if that's useful.
Source: dubinc/dub