Common Issues
This guide covers the most common problems and their solutions.
Installation Issues
Error: "Module not found"
Symptom:
Error: Cannot find module 'framer-motion'
Module not found: Can't resolve '@ai-sdk/google'Cause: Missing dependencies or corrupted node_modules
Solution:
# Remove node_modules and lock file
rm -rf node_modules package-lock.json
# Clear npm cache
npm cache clean --force
# Reinstall dependencies
npm install
# Restart dev server
npm run devError: "Node version not supported"
Symptom:
Cause: Node.js version is too old
Solution:
Error: "Port 3000 already in use"
Symptom:
Cause: Another process is using port 3000
Solution 1 - Use different port:
Solution 2 - Kill the process (macOS/Linux):
Solution 3 - Kill the process (Windows):
API & Environment Issues
Error: "API key not configured"
Symptom:
Chat doesn't work
Console shows API key errors
Blank responses
Solution:
Create
.env.localin root directory:
Add your API key:
Verify the variable name is exactly as shown (common typo)
No quotes around the value
Restart the dev server:
Check file location - must be in root, not in
app/folder
Error: "API request failed"
Symptom:
Causes & Solutions:
1. Invalid API key:
Go to Google AI Studio
Verify key is active
Generate new key if needed
Update
.env.local
2. Rate limit exceeded:
Google AI free tier has limits
Wait 1 minute and try again
Consider upgrading API tier
3. Network issues:
Check internet connection
Disable VPN temporarily
Check firewall settings
4. API service down:
Check Google AI status
Try again later
Environment variables not loading
Symptom: Variables work locally but not in production
Solution for Vercel:
Go to Project → Settings → Environment Variables
Add
GOOGLE_GENERATIVE_AI_API_KEYSelect all environments (Production, Preview, Development)
Redeploy the project
Solution for local:
Verify file is named
.env.localexactlyRestart dev server after changes
Check
.gitignoreincludes.env.local
Build Issues
Error: "Build failed"
Symptom:
Common causes:
1. Syntax errors:
2. Import errors:
3. Type errors (if using TypeScript):
4. Environment variables:
General solution:
Error: "Tailwind CSS not working"
Symptom:
No styles applied
Plain HTML appearance
Missing colors
Solution:
Verify Tailwind installation:
Check
globals.csshas:
Verify import in
layout.js:
Clear cache and rebuild:
Runtime Issues
Cooldown doesn't work
Symptom: Can send multiple messages without waiting
Solution:
Check browser console for JavaScript errors
Verify localStorage is enabled:
Clear localStorage:
Refresh the page and try again
Cooldown stuck at 50 seconds
Symptom: Countdown never decreases
Solution:
Check browser console for errors
Clear localStorage:
Refresh the page
Check useEffect is working:
Messages not displaying
Symptom:
Send message but nothing appears
Blank chat area
No error messages
Solution:
Check browser console for errors
Verify API is responding:
Check network tab in DevTools:
Is request being sent?
What's the response status?
Any errors?
Verify
useChathook is working:
Streaming responses are slow
Symptom: AI takes 30+ seconds to respond
Causes & Solutions:
1. Web search is slow (expected):
Searches take 5-15 seconds
This is normal for real-time data
Consider reducing search requirements
2. Large max tokens:
3. Network latency:
Check internet speed
Try different network
Disable VPN
4. Google AI API slow:
Try at different time
Check API status
Consider different region
UI Issues
Matrix rain causing lag
Symptom: Animations are choppy, page is slow
Solution 1 - Disable on mobile:
Solution 2 - Reduce complexity:
Solution 3 - Remove completely:
Styles not updating
Symptom: CSS changes don't appear
Solution:
Hard refresh browser:
Chrome/Firefox: Ctrl+Shift+R (Cmd+Shift+R on Mac)
Safari: Cmd+Option+R
Clear .next folder:
Check Tailwind classes are correct:
Icons not showing
Symptom: Square boxes instead of icons
Solution:
Verify lucide-react is installed:
Check import:
Clear cache and reinstall:
Deployment Issues
Vercel build fails
Symptom: Deployment fails with build errors
Solution:
Test build locally first:
Check build logs in Vercel Dashboard
Verify environment variables are added
Ensure Node version matches:
Check for ESLint errors:
Function timeout on Vercel
Symptom:
Cause: Vercel Hobby plan has 10-second limit
Solutions:
Option 1 - Upgrade to Pro ($20/month):
60-second limit
Better support
More resources
Option 2 - Reduce timeout:
Then adjust cooldown in app/app/page.js to match.
Option 3 - Use different host:
Railway
Render
Self-hosted
Domain not working
Symptom: Custom domain doesn't load
Solution:
Wait 24-48 hours for DNS propagation
Verify DNS records:
Check DNS propagation:
Visit whatsmydns.net
Enter your domain
Check if records are propagating
Verify in Vercel Dashboard:
Settings → Domains
Check for error messages
SSL certificate status
Performance Issues
Page loads slowly
Optimization checklist:
Optimize images:
Reduce animations:
Code splitting:
Analyze bundle:
High API costs
Symptom: Google AI bill is high
Solutions:
Reduce max tokens:
Implement caching:
Increase cooldown:
Monitor usage:
Check Google AI Studio quota
Set up billing alerts
Track usage per day
Getting More Help
If your issue isn't listed here:
Check the logs:
Browser console
Terminal output
Vercel logs (if deployed)
Search GitHub Issues:
Someone may have solved it
Ask for help:
Include error messages and logs
Read related docs:
Still stuck? Open an issue with detailed information and we'll help you out!
Last updated
