AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Incorrect Environment Variable Name In Next.Js Quickstart Docs And .Env.Example Breaks App Initialization

The Next.js quickstart documentation and the starter's .env.example reference NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, but the starter code expects NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY, causing runtime errors when users follow the guide.

highConfidence 90%Next.jsRoute Handlersnext build

Origin Analysis

A typo/inconsistency in environment variable naming: the documentation and .env.example use the shorter NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY instead of the NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY variable that the starter code actually reads. This stems from a mismatch during the transition to Supabase's new publishable/secret key model where the default publishable key variable is suffixed with _DEFAULT.
1. Create a new Next.js project using the Supabase starter. 2. Copy the .env.example content as instructed in the quickstart. 3. Fill in the Supabase URL and publishable key using the provided NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY variable. 4. Run the app and observe an error because the client cannot find NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY.

Fixing Code Block

Edge Case Audit

This fix changes the documented environment variable name. Users who have already set NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY must rename it to NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY in their .env.local or environment. If a future update changes the starter code to use a non-default publishable key (e.g., a named key), then this documentation fix would become stale again. Rollback is trivial: revert the env var name in docs and .env.example if the code is updated to use the shorter variable. To avoid breaking existing environments, consider supporting both variable names with a fallback in the code.

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state