Guias de correção de erros

Os erros que mais aparecem para quem cria com ferramentas de IA — explicados em linguagem simples, com um prompt que faz seu agente de código corrigi-los.

Corrija a exposição de variáveis de ambiente Vite/Lovable em builds

Variable is not defined in browser / Vite build didn't include it

Corrigir erro 42501 de RLS no Supabase

new row violates row-level security policy for table "profiles"

Corrija o erro "Failed to fetch"

Error: failed to fetch

Corrija as APIs assíncronas do Next.js 15+

Next.js 15+ App Router page props are Promises

Corrigir CORS em Edge Functions do Supabase com Lovable

Access to fetch at ... from origin ... has been blocked by CORS policy

Corrigir HTTP 413 Request Entity Too Large no Claude Code

HTTP 413 Request Entity Too Large

Corrigir Can't resolve '@/components/ui/button'

Module not found: Can't resolve '@/components/ui/button'

Corrija o erro "Hydration failed" do Next.js

Error: Hydration failed because the server rendered HTML didn't match the client

Erro de CORS "No 'Access-Control-Allow-Origin'": como corrigir

Access to fetch at 'https://api.example.com' from origin 'http://localhost:3000'

Corrija "new row violates row-level security policy"

new row violates row-level security policy for table "profiles"

Corrigir 401 "invalid x-api-key" / "Incorrect API key"

401 Unauthorized: invalid x-api-key / Incorrect API key provided

Corrija Cannot read properties of undefined (reading 'map')

TypeError: Cannot read properties of undefined (reading 'map')

Corrigir "ReferenceError: window is not defined" no Next.js

ReferenceError: window is not defined

Corrigir Next.js "Build failed because of TypeScript errors"

Type error: ... Build failed because of TypeScript errors (next build / vercel d

Corrigir EADDRINUSE: address already in use :::3000

Error: listen EADDRINUSE: address already in use :::3000

Corrija "@prisma/client did not initialize yet"

@prisma/client did not initialize yet. Please run "prisma generate" and try to i

Corrigir "Updates were rejected" (fetch first) no git push

! [rejected] main -> main (fetch first) error: failed to push some refs ... Upda

Corrigir erro "No signatures found matching" do Stripe

No signatures found matching the expected signature for payload. Are you passing

Corrija useSearchParams() should be wrapped in Suspense

useSearchParams() should be wrapped in a suspense boundary at page "/". Read mor

Corrigir Supabase "Edge Function returned a non-2xx"

FunctionsHttpError: Edge Function returned a non-2xx status code

Corrija o erro "Failed to fetch": CORS e localhost

TypeError: Failed to fetch

Corrija o loop infinito "Too many re-renders" do React

Too many re-renders. React limits the number of renders to prevent an infinite l

Corrija o "Invalid Refresh Token: Not Found" do Supabase

AuthApiError: Invalid Refresh Token: Refresh Token Not Found

Corrigir Cannot read properties of null (reading 'X')

TypeError: Cannot read properties of null (reading 'X')

Corrija "Maximum update depth exceeded" no React

Error: Maximum update depth exceeded. This can happen when a component repeatedl

Corrija o erro 504 FUNCTION_INVOCATION_TIMEOUT da Vercel

504: GATEWAY_TIMEOUT Code: FUNCTION_INVOCATION_TIMEOUT · Vercel Runtime Timeout

Corrija "Invalid login credentials" e "Email not confirmed"

AuthApiError: Invalid login credentials

Corrija "Cross-Origin-Opener-Policy" no login popup

Cross-Origin-Opener-Policy policy would block the window.closed call.

Corrija o "Dynamic server usage" do Next.js (renderização estática)

Error: Dynamic server usage: Route /dashboard couldn't be rendered statically be

Corrigir Supabase "AuthSessionMissingError"

AuthSessionMissingError: Auth session missing!

Corrigir Vite "Failed to resolve import" (arquivo existe?)

[plugin:vite:import-analysis] Failed to resolve import "./components/Navbar" fro

Corrija o "Module not found: Can't resolve 'fs'" no Next.js

Module not found: Can't resolve 'fs'

Corrija "trying to use tailwindcss directly as a PostCSS plugin"

It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. T

Corrija o "Invalid hook call" do React: causas e soluções

Invalid hook call. Hooks can only be called inside of the body of a function com

Corrigir Next.js 16: "middleware" obsoleto (use proxy)

⚠ The "middleware" file convention is deprecated. Please use "proxy" instead.

Corrigir Claude Code "exceeded the 32000 output token"

API Error: Claude's response exceeded the 32000 output token maximum. To configu

Corrija o erro PGRST205 "Could not find the table" no Supabase

Could not find the table 'public.profiles' in the schema cache

Corrija o erro "Rendered more hooks than during the previous render"

Error: Rendered more hooks than during the previous render.

Corrija o "JWT expired" do Supabase (PGRST303, 401)

{"code":"PGRST303","details":null,"hint":null,"message":"JWT expired"}

Corrigir falha de build da Netlify por variável ausente

Netlify build fails because required environment variable not set (e.g. undefine

Corrigir Supabase 42501: GRANT ausente

permission denied for table "profiles" (code 42501)

Corrigir erro de runtime do Next.js 16 no proxy

Build error about runtime config being rejected in proxy.ts (Next.js 16). The pr

Corrija 400 do Claude Code por blocos de ferramenta

Claude Code returns a 400 error when tool_use blocks aren't followed by their to

Corrigir React: atualizar componente durante o render

Warning: Cannot update a component (`X`) while rendering a different component (

Corrigir erro Claude Code: thinking block inválido

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message"

Corrija Claude Code "pensar não pode ser modificado"

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message"

Erro do Supabase "infinite recursion detected in policy"

infinite recursion detected in policy for relation "profiles"

Corrigir erro npm ERESOLVE de dependências

npm ERR! ERESOLVE unable to resolve dependency tree

Corrigir 403 "permission denied" no Supabase Storage

permission denied for table storage.objects

Correção Supabase "Invalid API key" e 401

{"message":"Invalid API key","hint":"Double check your Supabase anon or service_

Corrigir "headers was called outside a request scope" no Next.js App Router

`headers` was called outside a request scope. Read more: https://nextjs.org/docs

Corrija "NetworkError" no Firefox

TypeError: NetworkError when attempting to fetch resource.

Corrigir variável de ambiente do Next.js ausente na build

Next.js build fails because a required environment variable is undefined or not

Corrige React "Each child in a list should have a unique key"

Warning: Each child in a list should have a unique "key" prop.

Corrigir limite de e-mails do Supabase Auth (429)

email rate limit exceeded (code: over_email_send_rate_limit, HTTP 429)

Corrigir hidratação Next.js: Date.now() no render

Error: Hydration failed because the server rendered HTML didn't match the client

Correção Supabase 42501 permissão negada para novas tabelas

42501: permission denied for table "tablename"

Corrigir limite de taxa do Cursor no OpenAI

Rate limit exceeded for your OpenAI key.

Corrija o Lovable app que não carrega / 'Algo deu errado'

Something went wrong on our end. You can try refreshing or head back home.

Corrigir falhas de build no Netlify

Netlify build failed / deployment error

Fix Next.js middleware deprecation - rename middleware.ts to proxy.ts

Next.js middleware is deprecated; use proxy.ts instead

Fix Next.js 16 proxy files not allowing runtime config

Next.js 16 proxy files do not allow a runtime configuration