Skip to content
·9 min read

50 Most Common Errors in Vibe-Coded Apps and How to Fix Them

The definitive checklist of errors every vibe coder encounters, organized by category with quick-fix solutions

Share

Use this list to identify a symptom, check its cause and verify a repair. The fifty entries are a practical troubleshooting index, not a statistical ranking of how often AI makes each mistake. Start with the first failing request or command, preserve its relevant error privately and reproduce it before asking for another code change.

Triage before editing

Record the expected behavior, actual behavior, affected environment and last working commit. Check the browser request and server log for the same action. Remove credentials and customer data before sharing diagnostics.

Make one bounded repair, run the failing case again and check a nearby success case. Do not install a package, disable authorization or replace a whole configuration just because an error message mentions it.

Build and compilation

#SymptomCheck and repairVerify
1Package cannot be foundCheck spelling, installed version and whether it belongs to this workspace before installingLocked clean install and build succeed
2Local module missingMatch the real path and filename case; check exportsBuild in the deployment environment
3Property does not existInspect the installed type or schema and use the supported fieldRelevant type check passes
4Adjacent JSX elements failReturn a single enclosing element or fragmentComponent compiles
5Unexpected tokenInspect the reported line and preceding delimiters; check file syntaxParser accepts the corrected file
6Duplicate identifierFind both declarations and retain the intended oneImports and exports remain valid
7Type is not assignableCorrect the contract or validate the input; avoid hiding it with anyCorrect and invalid inputs are checked
8Module format errorMatch ESM/CommonJS across that file, package and runnerStart the affected command; do not flip the whole project blindly
9JSX transform errorCheck the compiler and JSX runtime configuration for the installed stackA minimal affected component renders
10Invalid hook callCheck hook placement and duplicate or mismatched React copiesComponent renders through the failing path

Keep project commands in the instruction file so the next session does not guess a different package manager or test runner.

Runtime and state

#SymptomCheck and repairVerify
11Reading an undefined valueValidate the response boundary; handle missing data explicitlyEmpty, invalid and success cases
12Hydration mismatchCompare server and first client render; inspect dates, browser state and invalid HTMLNo mismatch on a fresh load
13Infinite renderingFind the update cycle and remove unnecessary derived state or unstable dependenciesUpdates stop after the intended action
14State appears staleUse the next value directly or a functional update when based on prior stateTwo rapid actions give the right result
15Interval or subscription persistsReturn effect cleanup and cancel obsolete workLeaving the route stops its activity
16Recursive stack overflowAdd a correct termination condition and inspect cyclesBase and recursive cases terminate
17Missing array elementHandle an empty list and validate indicesZero, one and last-item cases
18Pagination skips a pageAlign index base, cursor and end-of-list contractFirst, middle and final pages
19Concurrent writes conflictEnforce the invariant transactionally or with conditional writesSimultaneous requests preserve stored data
20Handler sees old valuesReview closure dependencies and use a suitable functional update or current referenceAction uses the latest state
21Date shifts a dayDecide whether the value is a calendar date or timestamp; preserve the distinctionTest more than one timezone
22Money rounds incorrectlyUse integer minor units or a suitable decimal type with currency rulesBoundary and rounding examples
23Special characters break inputEncode for the destination format; parameterize database queriesQuotes, Unicode and reserved characters
24Styles override unpredictablyInspect computed styles and remove competing ownershipAffected states work in both themes
25Spinner never endsResolve success, error and cancellation paths explicitlySlow, failed and completed requests

For hydration, the Next.js explanation lists several causes; moving all rendering into an effect is not a universal repair. For concurrency, await in one request does not serialize other users' requests.

API and data

#SymptomCheck and repairVerify
26CORS blocks a browser requestMatch allowed origins, preflight and credentials deliberatelyAllowed origin works; an unintended origin does not gain access
27Protected request returns 401Check the intended session or token lifecycleSigned-in works; signed-out stays denied
28API returns 404Check method, path, base URL and route deploymentRequest reaches the expected handler
29Rate limit returns 429Honor applicable retry timing; bound attempts, concurrency and total durationLoad falls rather than amplifies
30JSON parsing failsCheck status and response content type before parsingHTML error and valid JSON handled
31Database times outInspect connection use, pooling and slow queriesRepresentative concurrent load completes
32User input changes SQL meaningUse parameterized queries and bounded privilegesInjection-like input remains data
33Configuration missingValidate required settings in the correct environmentFresh production build or startup fails clearly when incomplete
34Webhook signature failsCheck environment secret and exact raw-body verification requirementsValid event accepted; tampered event rejected
35JSON serialization failsMap unsupported values to an explicit response contractBigInt and missing-field cases handled deliberately

Authentication and authorization

#SymptomCheck and repairVerify
36Login redirect loopsExclude public entry and callback routes as appropriateLogin, callback and protected deep link
37Session disappearsCheck cookie domain, path, expiry, cross-site flow and SDK requirementsRefresh and callback work on the real domain
38OAuth callback rejectedMatch the provider's registered destination and allowed redirectsPreview and production tested separately
39RLS returns no rowsCheck grants, session, role and operation-specific policyOwner succeeds and another account stays blocked
40Session credentials exposedFollow the framework's supported session design and protect against XSS/CSRFSensitive credentials stay out of URLs, logs and public assets
41Another user's record accessibleEnforce resource ownership on the server or databaseSubstitute the other user's ID and confirm denial
42Reset link reusable indefinitelyUse a short-lived, single-use recovery designExpired and reused link cannot reset a password
43Cross-site mutation succeedsApply the framework's CSRF protection and origin policy where requiredLegitimate request works; forged cross-site action fails

Cookie attributes depend on the authentication architecture; “make every cookie HttpOnly” can break an SDK that expects browser access. Follow the supported design and test it. Use two-user authentication checks and the Supabase RLS guide before relaxing a policy to fix an empty screen.

Deployment and operations

#SymptomCheck and repairVerify
44CI fails while local worksMatch runtime, lockfile, variables, paths and installed framework versionReproduce with a clean production build
45Function exceeds its limitCheck the actual plan and runtime; bound work or use a supported job mechanismWorst expected work stays within the recorded limit
46Build runs out of memoryIdentify the phase and memory-heavy inputs before changing limitsBuild completes under the target allocation
47Mixed-content warningReplace unintended HTTP resources with supported HTTPS endpointsNo insecure request in the affected flow
48Static rendering fails on runtime dataChoose the framework's supported rendering model for that routeBuild and authenticated runtime behavior both work
49Certificate invalidCheck domain ownership, DNS, hostname and certificate issuanceA normal browser establishes a valid secure connection
50First request is slowMeasure cold and warm requests, dependency latency and compute workRepeated measurements improve under the same conditions

Do not bypass a browser certificate warning or assume waiting will fix a wrong hostname. An edge runtime is not a universal performance repair; it can change API compatibility and data-access latency.

Keep the fix from returning

For a meaningful bug, retain a regression check that fails for the original reason. For a visual fix, inspect the rendered result and affected states using the verification walkthrough. Record what passed and what remains untested.

Before releasing the change, run the deployment checklist. If requests can trigger paid model work, also check usage limits and API budgeting.

PJ
Pranay Joshi

20+ years building products at scale. VP of Product & Engineering, startup founder, and AI coach. Helping dreamers turn ideas into reality with vibe coding.