Guías para solucionar errores

Los errores que más encuentran quienes crean con herramientas de IA, explicados en lenguaje sencillo, con un prompt que hace que tu agente de programación los solucione.

Variables de entorno Vite/Lovable en el navegador

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

Corregir RLS de Supabase: error 42501 en profiles

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

Corrige el error "Failed to fetch"

Error: failed to fetch

Arregla APIs asíncronas de petición en Next.js 15+

Next.js 15+ App Router page props are Promises

Corregir CORS para Supabase Edge Functions con Lovable

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

HTTP 413 Request Entity Too Large en Cursor y Claude Code

HTTP 413 Request Entity Too Large

Solución a Can't resolve '@/components/ui/button'

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

Corrige el error "Hydration failed" de Next.js

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

Error CORS "No 'Access-Control-Allow-Origin'": cómo solucionarlo

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

Soluciona "new row violates row-level security policy"

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

Soluciona el 401 "invalid x-api-key" / "Incorrect API key"

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

Solución: Cannot read properties of undefined (map)

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

Soluciona "ReferenceError: window is not defined" en Next.js

ReferenceError: window is not defined

Soluciona "Build failed because of TypeScript errors"

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

Solución a EADDRINUSE: address already in use :::3000

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

Soluciona "@prisma/client did not initialize yet"

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

Soluciona "Updates were rejected" (fetch first) en git push

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

Arregla el error de webhook de Stripe "No signatures"

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

Solución: useSearchParams() debe ir dentro de Suspense

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

Solución: Supabase "Edge Function returned a non-2xx"

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

Corregir error "Failed to fetch": CORS y localhost

TypeError: Failed to fetch

Arregla el bucle infinito "Too many re-renders" en React

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

Solución a Supabase "Invalid Refresh Token: Not Found"

AuthApiError: Invalid Refresh Token: Refresh Token Not Found

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

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

Soluciona "Maximum update depth exceeded" en React

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

Solucionar Vercel 504 FUNCTION_INVOCATION_TIMEOUT

504: GATEWAY_TIMEOUT Code: FUNCTION_INVOCATION_TIMEOUT · Vercel Runtime Timeout

Arregla "Invalid login credentials" y "Email not confirmed"

AuthApiError: Invalid login credentials

Solución: "Cross-Origin-Opener-Policy… window.closed"

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

Solución a "Dynamic server usage" de Next.js

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

Soluciona Supabase "AuthSessionMissingError"

AuthSessionMissingError: Auth session missing!

Solución a Vite "Failed to resolve import" en Vite

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

Solucionar Next.js "Module not found: Can't resolve 'fs'"

Module not found: Can't resolve 'fs'

Solución: "trying to use tailwindcss directly as a PostCSS plugin"

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

Arregla React "Invalid hook call": causas y soluciones

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

Arregla "middleware file convention is deprecated" Next.js 16

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

Solución: Claude Code "exceeded the 32000 output token maximum"

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

Solución: Supabase "Could not find the table" (PGRST205)

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

Arregla React "Rendered more hooks than during the previous render"

Error: Rendered more hooks than during the previous render.

Arregla Supabase "JWT expired" (PGRST303, 401)

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

Errores en build Netlify por variable de entorno faltante

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

Supabase 42501: «permission denied for table»

permission denied for table "profiles" (code 42501)

Corrige error de configuración de runtime en proxy Next.js 16

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

Error 400 Claude Code: tool_use y tool_result sin pares

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

Arregla React: No actualizar componente durante render ajeno

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

Corrige el error "Invalid signature in thinking block"

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

Corrige el error de thinking de Claude Code (400)

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

Corrige error Supabase "infinite recursion en política"

infinite recursion detected in policy for relation "profiles"

Soluciona npm ERESOLVE: árbol de dependencias

npm ERR! ERESOLVE unable to resolve dependency tree

Corrige los errores de permiso y 403 en Supabase Storage

permission denied for table storage.objects

Corrige los errores 401 "Invalid API key" de Supabase

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

Fix "headers was called outside a request scope" en Next.js

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

Arregla el "NetworkError" de Firefox al hacer fetch

TypeError: NetworkError when attempting to fetch resource.

Variables de entorno de Next.js en el build

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

Arregla el aviso de React: falta "key" en cada elemento

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

Arregla Supabase Auth "email rate limit exceeded" (429)

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

Corregir la hidratación de Next.js: Date.now() en render

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

Corrige el error 42501 de Supabase al crear tablas nuevas

42501: permission denied for table "tablename"

Corrige el límite de Cursor con OpenAI

Rate limit exceeded for your OpenAI key.

App de Lovable no carga: 'Something went wrong'

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

Corrige fallos de compilación en 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