Errors
Vibe coding errors, explained. Paste one, get the fix.
Stuck on an error? Find it here, read what it means in plain English, and copy a prompt your AI coding tool can use to fix it.
React and Next.js
Errors from components, hooks, and server rendering.
Hydration failed
The HTML the server sent didn’t match what React rendered first in the browser, so React threw that part away and rebuilt it on the client.
Too many re-renders
A component changes its own state while it renders, so React renders it again and again until it stops the loop.
Each child in a list should have a unique "key" prop
A list rendered with map gave its items no stable ID, so React can’t tell which item is which when the list changes.
Objects are not valid as a React child
React was asked to show a whole object, such as a database row or a date, on the page, and it can only show text, numbers, and elements.
ReferenceError: window is not defined
Code that only works in a browser ran on the server, where there is no window, document, or localStorage.
Invalid hook call
A hook such as useState ran somewhere React can’t track it, or the app loaded two copies of React that don’t know about each other.
Maximum update depth exceeded
State updates kept triggering more state updates in a loop, usually through an effect or a callback, so React stopped them.
Element type is invalid
A JSX tag pointed at undefined or an object instead of a component, almost always because an import doesn’t match how the file exports it.
Changing an uncontrolled input to be controlled
A form field started with no value and then got one, so React switched from letting the browser manage it to managing it from state.
You’re importing a component that needs useState
A Next.js Server Component used a browser-side React feature like useState, which only works in files marked as Client Components.
Rendered more hooks than during the previous render
A component called a different number of hooks than on its last render, usually because a hook sits after an early return or inside an if.
useNavigate() may be used only in the context of a <Router>
A component used React Router’s navigation outside the router, so it had no route information to work with.
JavaScript
Everyday runtime errors in the browser console.
Cannot read properties of undefined
The code asked for a property of a value that doesn’t exist yet, usually data that hasn’t loaded or a field the API didn’t return.
X is not a function
The code called something that isn’t a function, most often .map on API data that came back as an object or a string instead of an array.
X is not defined
The code used a name JavaScript can’t find anywhere, usually because of a missing import, a typo, or a Node-only global like process in the browser.
process is not defined
Browser code used process, a Node.js global that browsers don’t have, usually to read an environment variable the Node.js way.
Maximum call stack size exceeded
A function kept calling itself, directly or through other functions, until JavaScript ran out of room to keep track of the calls.
Assignment to constant variable
The code tried to give a new value to a variable declared with const, which can only be set once.
APIs and network
Errors when the app talks to a server or an API.
Blocked by CORS policy
The browser hid a response from another site because that server never said your site is allowed to read it.
Failed to fetch
The browser never got a usable response: the server was unreachable, or the browser blocked the request or its reply.
Unexpected token '<', "<!DOCTYPE "... is not valid JSON
Your code expected JSON, but the server sent back an HTML page, usually a 404 page or your app’s own index.html.
net::ERR_CONNECTION_REFUSED
Nothing was listening at that address and port, usually because the server isn’t running or the app is calling the wrong port.
Unexpected end of JSON input
Your code tried to read JSON from text that was empty or cut off, so the parser ran out of input before the data was complete.
401 Unauthorized
The server couldn’t confirm who was calling: the request had no credentials, or its API key, session, or token was wrong or expired.
403 Forbidden
The server knows who is calling and still refuses, because that user, key, or visitor lacks permission for this request.
500 Internal Server Error
The server’s code threw an error or crashed while handling the request, and the real error message is waiting in the server logs.
429 Too Many Requests
The service is rate limiting you: too many requests arrived in a short time, so it refuses more until the limit resets.
Mixed Content: requested an insecure resource
Your secure https page tried to load data or code over plain http, and the browser blocked that request to keep the page secure.
413 Payload Too Large
The request body, usually a file upload, was bigger than the server or host accepts, so it was rejected before your code could handle it.
Database
Postgres and Supabase errors when reading and saving data.
New row violates row-level security policy
Postgres refused to save a row because no row-level security policy on that table lets the current user write it.
Relation does not exist
The query names a table that Postgres can’t find in this database, usually because it was never created here or has a different name.
Duplicate key value violates unique constraint
The app tried to save a row whose ID, email, or other unique value is already in the table, so Postgres rejected the copy.
Column does not exist
A query names a column the table doesn’t have, often because of a migration that never ran, a camelCase name, or text in double quotes.
Insert or update on table violates foreign key constraint
A row points at a parent row that doesn’t exist, or something tried to delete a parent row that other rows still point at.
Null value in column violates not-null constraint
A save left a required column empty, and that column has no default value for Postgres to fill in.
Sorry, too many clients already
Every connection slot on the Postgres server is taken, usually by serverless functions that each open connections of their own.
Permission denied for table
The database role making the request has no grant on that table, so Postgres refuses before row-level security even runs.
Infinite recursion detected in policy for relation
A row-level security policy reads from its own table, so checking the policy runs the same policy again, without end.
Cannot coerce the result to a single JSON object
A Supabase query asked for exactly one row with single(), but its filter matched no rows or more than one.
Could not find the column in the schema cache
An insert or update sent a field that Supabase’s API doesn’t know as a column of that table, so it refused the whole write.
Sign-in
Errors when people sign up, sign in, or stay signed in.
Error 400: redirect_uri_mismatch
Google stopped the sign-in because the return address your app sent isn’t on the OAuth client’s list of approved redirect URIs.
JWT expired
A request carried a sign-in token past its expiry time, usually because code saved the token once instead of using the refreshed one.
Invalid login credentials
Supabase couldn’t match that email and password to an account that signs in with a password, and it deliberately doesn’t say which part was wrong.
Email not confirmed
The password was right, but the person hasn’t clicked the confirmation link Supabase emailed at sign-up, so sign-in is blocked.
AuthSessionMissingError: Auth session missing
A Supabase auth call needed a signed-in user, but the client making it had no session, often because it runs on the server without cookies.
Email rate limit exceeded
Supabase stopped sending sign-up, magic link, or reset emails because the project hit its hourly email limit, which is tiny with the built-in sender.
Install and build
Errors from npm, TypeScript, and the dev server.
Cannot find module
Node tried to load a package or file that isn’t where the code says it is, usually because it was never installed or the path is wrong.
Cannot find module or its corresponding type declarations
TypeScript couldn’t match an import to a file or package it understands, so the build fails even when the app runs fine in the browser.
Cannot use import statement outside a module
A file written with import syntax was loaded as an old-style script or CommonJS file, so loading stopped at the first import line.
Module not found: Can't resolve
The bundler followed an import to a file or package that doesn’t exist under that name, so it couldn’t build the page.
Failed to resolve import
Vite couldn’t find the file or package an import points to, so it can’t serve or build the page until the import matches something real.
ERESOLVE unable to resolve dependency tree
npm stopped installing because a package only supports a different version of something your project already uses, most often React.
JavaScript heap out of memory
Node used up all the memory it’s allowed and crashed, usually during a large build or in code that keeps holding on to more and more data.
EADDRINUSE: address already in use
Another program is already listening on the port your server wants, often an old copy of the same dev server that never stopped.
Property does not exist on type
TypeScript can’t find that field on the type it has for this value, either because the type is wrong or because the value might not have it.
Type is not assignable to type
A value’s type doesn’t match what the variable, prop, or function expects, often because the value might be missing or is the wrong kind.
vite: command not found
The shell couldn’t find the vite program, almost always because the project’s packages aren’t installed or the command ran in the wrong folder.
Deploy and domains
Errors after publishing, from hosting, DNS, and HTTPS.
ERR_TOO_MANY_REDIRECTS
The site keeps redirecting the browser in a circle, usually between HTTP and HTTPS or between two domains, so the browser stops trying.
DNS_PROBE_FINISHED_NXDOMAIN
The browser asked DNS where your domain lives and was told the name doesn’t exist, usually because a record is missing or still spreading.
NET::ERR_CERT_COMMON_NAME_INVALID
The site’s security certificate was issued for a different domain name, so the browser can’t confirm it’s really your site.
Error 522: Connection timed out
Cloudflare couldn’t open a connection to the server behind your site in time, so it showed its own error page in place of your app.
404 on page refresh
Your single-page app works from the home page, but the host has no file for deeper URLs, so reloads and shared links hit a 404.
Failed to load module script
The browser asked for your app’s JavaScript and got an HTML page back, so it refused to run it and the page stayed blank.
Failed to fetch dynamically imported module
The browser asked for a piece of your app that no longer exists, usually because a new deploy replaced it while the page was open.
Command "npm run build" exited with 1
Your build script failed on the host. This line only reports the failure; the actual error is printed earlier in the build log.
Error 1101: Worker threw exception
Your Cloudflare Worker hit a JavaScript error while handling the request, so Cloudflare showed its error page in place of a response.
FUNCTION_INVOCATION_TIMEOUT
A Vercel Function ran past its time limit, so Vercel stopped it and returned a 504 in place of your response.
supabaseUrl is required
The deployed app created its Supabase client with an empty URL, because the environment variable holding it never made it into the build.
Payments
Stripe errors from checkout and webhooks.
No signatures found matching the expected signature
Your webhook code couldn’t verify that a Stripe event is genuine, usually because the body was parsed before the check or the secret is wrong.
Invalid API Key provided
Stripe rejected the request because the API key it received doesn’t match any active key, often a placeholder, a typo, or a deleted key.
No such price
Stripe couldn’t find the price ID your code sent, because it belongs to the other mode, another account or sandbox, or isn’t a price ID at all.
AI APIs
Errors from OpenAI, Anthropic, and other model APIs.
You exceeded your current quota
OpenAI refused the request because the account or project behind the API key is out of credit or has reached a spending limit.
Incorrect API key provided
The AI API rejected the key your code sent: it has a typo, was revoked, or isn’t the key you think the app is using.
Context length exceeded
The text sent to the model, including chat history, documents, and tool results, is more than the model can read in one request.
Anthropic API 529 overloaded_error
Anthropic’s API had more traffic than it could serve at that moment, so it turned your request away even though the request was fine.
It looks like you're running in a browser-like environment
The AI SDK refused to run in the browser, because your secret API key would be visible to anyone who opens the page.
Git and GitHub
Errors when saving, pushing, and merging code.
Failed to push some refs
GitHub has commits your copy doesn’t, so git refused to overwrite them until you bring those changes in.
fatal: not a git repository
Git searched this folder and every folder above it and found no repository, so the command has nothing to work on.
CONFLICT (content): Merge conflict
Both versions changed the same lines in different ways, and git needs you to decide what the file should say before it finishes.
GH013: Push cannot contain secrets
GitHub found an API key or other secret in the commits you tried to push and blocked the whole push so the secret wouldn’t land in the repository.