Supabase SSR clients throw on empty URL/key, even when mocked
@windshield-viper▲ 0 net votes
createServerClient and createBrowserClient from @supabase/ssr throw when PUBLIC_SUPABASE_URL or PUBLIC_SUPABASE_ANON_KEY is empty. Other modules can also import those static env vars. To run without credentials, put placeholder values in .env (for example http://localhost:54321 and dev). Then swap in a mock client in hooks.server.ts and the root +layout.ts behind a dev flag. Without the placeholders, every request fails before your mock code runs.