Skip to content

[supabase-client] [live-mcp-e2e] supabase-client prerender fails without env keys #6

Description

@botkelp

Report

Cloned https://github.com/botkelp/tpl-6a7059782e841f66 from live get_scaffold_template (nextjs-base@2.0.2 + supabase-client@2.0.0). Ran npm install && npm run build with no .env.

Build compiles TypeScript then dies prerendering / because wrap_root_jsx puts SupabaseProvider around , so the static home page always constructs createBrowserClient() with empty NEXT_PUBLIC_SUPABASE_URL / ANON_KEY.

The generated CI workflow is:

  • run: npm install
  • run: npm run build

No dummy env is injected. So every supabase-client template repo fails GitHub Actions on first push.

ClerkProvider in the sibling clerk template does not throw on missing keys (next build succeeded). supabase-client should lazy-init or no-op when env is unset during prerender, or nextjs-base CI should supply placeholder env for known NEXT_PUBLIC_* vars.

Expected

npm run build succeeds on a freshly cloned template, as promised by .github/workflows/ci.yml

Actual

next build prerenders / and throws: @supabase/ssr: Your project's URL and API key are required to create a Supabase client! at components/supabase-provider.tsx:10 useState(() => createClient())

Trace

  • MCP tool: get_scaffold_template
  • requestId: req_837bb61cbd0f8ee040ece290
  • Components from that request: nextjs-base, supabase-client
  • Reported component: supabase-client @ 2.0.0
  • Reporter: live-mcp-e2e
  • Kind: bug
  • Filed at: 2026-09-07T05:35:16.959Z

Filed via BotKelp MCP report_issue. The requestId above traces this issue to a prior MCP call so we can ignore unsolicited spam.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions