Platform
Cursor fixes
Production errors in apps written with Cursor, from env vars to server crashes.
30 fixes, most common first.
- Rank 9. Supabase Edge Function CORS error: Response to preflight request doesn't pass access control check
Calling a Supabase Edge Function from the browser fails with a CORS/preflight error? Handle OPTIONS and return corsHeaders on every response.
- Rank 18. infinite recursion detected in policy for relation
Supabase error 42P17 "infinite recursion detected in policy for relation"? Two RLS policies check each other. Break the loop with a function.
- Rank 19. permission denied for table (Supabase error 42501)
Supabase "permission denied for table"? The role lacks a GRANT on the table, which is checked before RLS. Add the grant, then a policy.
- Rank 20. Supabase Storage upload fails: new row violates row-level security policy
Image/file upload to Supabase Storage fails with an RLS error? Add policies on storage.objects for INSERT (plus SELECT/UPDATE for upsert).
- Rank 22. 500: INTERNAL_SERVER_ERROR / FUNCTION_INVOCATION_FAILED on Vercel
Live site shows 500 FUNCTION_INVOCATION_FAILED but works locally? Your server code crashed. Read the runtime logs, then check env vars.
- Rank 24. Hydration failed because the server rendered HTML didn't match the client
Next.js "Hydration failed" error? The server and browser drew different HTML. Fix nesting, window/localStorage use and dates.
- Rank 26. Vercel custom domain shows "Invalid Configuration"
Added your domain to Vercel and it says Invalid Configuration? Set the DNS records Vercel shows at your registrar and wait for DNS.
- Rank 32. Build failed: npm ERR! ERESOLVE
Vercel stops on npm ERR! ERESOLVE unable to resolve dependency tree? npm is refusing a peer dependency clash. Fix the versions, or override the install command on purpose.
- Rank 33. ReferenceError: window is not defined
Next.js crashes with window is not defined? The page is rendered on the server, where window does not exist. Read it after the component mounts.
- Rank 39. Prisma on Vercel: query engine not found
Vercel runs the app and Prisma can't find its query engine? The Rust engine file was left out of the serverless bundle, or Prisma Client was generated for the wrong machine.
- Rank 40. Supabase error: Email address not authorized
Sign-up tells the user Email address not authorized? The built-in mailer only sends to your Supabase organization. Custom SMTP sends to everyone else.
Can't fix it? Get help.
If the steps didn't clear the error, send what the screen says. A person can take a look. This is a request for a paid fix, not an instant chat.