fix: remove @supabase/ssr entirely to fix MIDDLEWARE_INVOCATION_FAILED

@supabase/ssr uses __dirname internally which crashes in Vercel's Edge
runtime, causing MIDDLEWARE_INVOCATION_FAILED even without a middleware
file. Replaced with @supabase/supabase-js directly:
- Server client: manual cookie-based session restoration
- Browser client: direct createClient from supabase-js
- Admin client: already using supabase-js

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
This commit is contained in:
Claude
2026-02-08 19:30:07 +00:00
parent ee6870d73e
commit 5ffb4fe32e
5 changed files with 55 additions and 48 deletions

View File

@@ -1,7 +1,5 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
serverExternalPackages: ["@supabase/ssr"],
};
const nextConfig: NextConfig = {};
export default nextConfig;