Stuck on an error? Find it here, get the fix, move on.
Jump to:
- AI Tools — Claude Code, Cursor, Copilot
- JavaScript/TypeScript — Modules, types, runtime
- Python — Imports, types, APIs
- React/Next.js — Hydration, hooks, routing
- Git — Push, merge, permissions
- Database — Postgres, Prisma
Cmd/Ctrl+F to search for your exact error.
Claude Code
| Error | Cause | Fix |
|---|
ANTHROPIC_API_KEY not set | Missing API key | export ANTHROPIC_API_KEY="sk-ant-..." |
Rate limit exceeded | Too many requests | Wait 60s, or use /compact to reduce tokens |
Context window exceeded | Conversation too long | Use /compact or /clear and restart |
Permission denied | File system restriction | Run with --dangerously-skip-permissions (careful!) |
Model not found | Invalid model name | Check claude --help for valid models |
Cursor
| Error | Cause | Fix |
|---|
Failed to connect | API/network issue | Check internet, restart Cursor |
Model context length exceeded | Too much context | Select less code, close tabs |
Composer failed | Multi-file op failed | Try smaller scope, check file permissions |
Rate limit | Too many requests | Wait or upgrade plan |
GitHub Copilot
| Error | Cause | Fix |
|---|
Copilot not available | Not logged in | Sign in via VS Code accounts |
No suggestions | Context unclear | Add comments, improve variable names |
Suggestion cut off | Token limit | Accept partial, ask for continuation |
JavaScript / TypeScript
Module Errors
| Error | Fix |
|---|
Cannot find module 'X' | npm install X or check import path |
Module not found: Can't resolve | Check spelling, add file extension |
SyntaxError: Cannot use import | Add "type": "module" to package.json |
__dirname is not defined | Use import.meta.dirname in ES modules |
Type Errors
| Error | Fix |
|---|
Type 'X' is not assignable to 'Y' | Check types match, add type assertion |
Property 'X' does not exist on type | Add property to interface or use optional chaining |
Object is possibly 'undefined' | Add null check: if (obj) { ... } |
Argument of type 'X' is not assignable | Cast with as Type or fix the type |
Runtime Errors
| Error | Fix |
|---|
TypeError: Cannot read property 'X' of undefined | Add null check before accessing |
ReferenceError: X is not defined | Check variable spelling, scope, imports |
RangeError: Maximum call stack exceeded | Fix infinite recursion |
SyntaxError: Unexpected token | Check for missing brackets, commas |
Python
Import Errors
| Error | Fix |
|---|
ModuleNotFoundError: No module named 'X' | pip install X or check venv |
ImportError: cannot import name 'X' | Check export exists, circular imports |
ModuleNotFoundError: No module named 'src' | Add __init__.py or fix PYTHONPATH |
Type Errors
| Error | Fix |
|---|
TypeError: 'NoneType' object is not subscriptable | Check for None before indexing |
TypeError: unsupported operand type(s) | Check variable types, add conversion |
AttributeError: 'X' object has no attribute 'Y' | Check spelling, object type |
API Errors
| Error | Fix |
|---|
requests.exceptions.ConnectionError | Check URL, network, try/except |
json.decoder.JSONDecodeError | Validate JSON, check response content-type |
KeyError: 'X' | Use .get('X') or check key exists |
React / Next.js
Common Errors
| Error | Fix |
|---|
Hydration failed | Server/client mismatch — check dynamic content |
Invalid hook call | Hooks only in components, check React version |
Too many re-renders | Move state update out of render, add deps |
Cannot update during render | Use useEffect for side effects |
Each child should have unique key | Add key prop to list items |
Next.js Specific
| Error | Fix |
|---|
'use client' must be first | Move 'use client' to line 1 |
Attempted import error: 'X' not exported | Check named vs default export |
Dynamic server usage | Add export const dynamic = 'force-dynamic' |
NEXT_PUBLIC_ prefix required | Env vars for client need NEXT_PUBLIC_ |
Git Errors
| Error | Fix |
|---|
fatal: not a git repository | git init or cd to repo |
error: failed to push | git pull --rebase first |
CONFLICT (content) | Edit file, git add, git commit |
Permission denied (publickey) | Add SSH key: ssh-add ~/.ssh/id_ed25519 |
remote: Repository not found | Check URL, permissions |
Database Errors
PostgreSQL
| Error | Fix |
|---|
connection refused | Check if Postgres is running |
relation "X" does not exist | Run migrations, check table name |
duplicate key value violates unique | Handle conflict or check data |
Prisma
| Error | Fix |
|---|
Environment variable not found: DATABASE_URL | Add to .env |
P2002: Unique constraint failed | Handle duplicate, check data |
P2025: Record not found | Check ID exists before update/delete |
Quick Debug Prompts
Copy these to ask AI for help:
I'm getting this error:
[PASTE ERROR]
Here's the relevant code:
[PASTE CODE]
What I expected to happen:
[DESCRIBE]
What actually happened:
[DESCRIBE]
This error started appearing after I:
[DESCRIBE CHANGE]
The full stack trace is:
[PASTE TRACE]
Help me understand what went wrong.
Pro Tips
Tip: Copy the FULL error message, including stack trace. AI needs context.
Tip: “It doesn’t work” is not helpful. Describe expected vs actual behavior.
Tip: When an error persists, ask AI: “What are ALL the possible causes of this error?”
Tip: Search the error message in quotes on Google/Stack Overflow before asking AI.
🎯 Error Not Listed?
- Copy the full error message
- Use this prompt:
I'm getting this error: [PASTE ERROR]
Code: [PASTE RELEVANT CODE]
What I tried: [DESCRIBE]
Help me fix it and explain why it happened.
- Ask in Discord if AI can’t help
Learn More