Troubleshooting
Common issues and how to resolve them.
Deployment Issues
Build Failures
Error: Module not found
Solution: Check package.json and ensure all dependencies are listed
Error: Build timeout
Solution: Optimize build process or increase timeout in settings
Error: Out of memory
Solution: Reduce bundle size or upgrade to higher tier
Deployment Stuck
- Check build logs for errors
- Verify all environment variables are set
- Ensure no infinite loops in build scripts
- Try canceling and redeploying
Runtime Errors
500 Internal Server Error
Common causes:
- Missing environment variables
- Database connection issues
- Unhandled promise rejections
- Memory limit exceeded
Debug steps:
- Check application logs
- Verify environment variables
- Test database connection
- Add error handling
404 Not Found
Common causes:
- Incorrect routing configuration
- Missing index.html for SPAs
- Case-sensitive file paths
- Wrong public directory
Solutions:
- Check route definitions
- Configure fallback routing
- Verify file names match imports
- Set correct build output
Performance Issues
Slow Load Times
Diagnosis:
- Check network tab in DevTools
- Run Lighthouse audit
- Monitor Core Web Vitals
- Check bundle size
Solutions:
- Enable compression
- Implement caching
- Optimize images
- Reduce JavaScript bundle
High Memory Usage
Symptoms:
- Random crashes
- Slow response times
- Out of memory errors
Solutions:
- Fix memory leaks
- Implement pagination
- Use streaming for large data
- Upgrade instance tier
Database Issues
Connection Errors
Error: Connection timeout
// Increase timeout
const db = new Database({
connectionTimeout: 30000
});
Error: Too many connections
// Implement connection pooling
const pool = createPool({
max: 20,
idleTimeout: 30000
});
Query Performance
Slow queries:
- Add indexes on frequently queried columns
- Use query explain plans
- Implement caching layer
- Optimize query structure
Authentication Issues
Login Not Working
Check:
- Cookie settings (SameSite, Secure)
- CORS configuration
- Session storage
- HTTPS in production
Solutions:
// Correct cookie settings
res.cookie('session', token, {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
sameSite: 'lax'
});
Session Expired
Implement refresh tokens:
// Refresh token logic
if (isTokenExpired(accessToken)) {
const newToken = await refreshToken(refreshToken);
// Update session
}
Common Error Messages
“Cannot read property of undefined”
- Add null checks
- Use optional chaining
- Validate data structure
“CORS blocked”
- Configure CORS headers
- Check API URL
- Verify allowed origins
“Request entity too large”
- Increase body size limit
- Compress request data
- Chunk large uploads
Getting Help
Before Asking for Help
- Check documentation
- Search existing issues
- Review error logs
- Try basic debugging
When Reporting Issues
Include:
- Error message
- Steps to reproduce
- Environment details
- Relevant code snippets
Support Channels
- Documentation: docs.irresistible.dev
- Community: discord.gg/irresistible
- Email: support@irresistible.dev
- GitHub Issues: github.com/irresistible/issues