Build Errors
Module not found
Unexpected token
Type error
Export not found
Runtime Errors
Cannot read properties of undefined
X is not a function
Network error
React/Next.js Errors
Hydration mismatch
- Using
Date.now()orMath.random()directly - Accessing
windoworlocalStoragewithout checks - Conditional rendering based on browser-only values
Invalid hook call
Too many re-renders
- Calling
setStatedirectly in render - Missing dependency array in
useEffect - State update triggering another state update
Database Errors
RLS policy violation
Foreign key violation
Duplicate key
Authentication Errors
Session not found
Invalid login credentials
Environment Variable Errors
Missing environment variable
- Go to Settings > Environment
- Add the missing variable
- Redeploy if in production
Quick Reference Table
| Error Contains | Likely Cause | Quick Fix |
|---|---|---|
Cannot find module | Wrong import | Check file path |
undefined | Missing data | Add null check |
not a function | Wrong variable type | Check variable |
Hydration | Server/client mismatch | Fix SSR |
Invalid hook | Hook misuse | Check hook rules |
Too many re-renders | Infinite loop | Fix useEffect/setState |
RLS policy | Security policy | Check Supabase RLS |
Failed to fetch | Network/API issue | Check endpoint |
NEXT_PUBLIC_ | Env var missing | Add to settings |
Getting More Help
If an error isn’t listed here:- Copy the full error message
- Paste it to Kleap AI with context about what you were doing
- Check browser console for additional details
Troubleshooting Guide
Step-by-step solutions to common problems

