This guide covers the most common problems and their solutions.
Installation Issues
Error: "Module not found"
Symptom :
Copy Error: Cannot find module 'framer-motion'
Module not found: Can't resolve '@ai-sdk/google' Cause : Missing dependencies or corrupted node_modules
Solution :
Copy # 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 dev Error: "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
Symptom :
Console shows API key errors
Solution :
Create .env.local in root directory :
Verify the variable name is exactly as shown (common typo)
No quotes around the value
Check file location - must be in root, not in app/ folder
Error: "API request failed"
Symptom :
Causes & Solutions :
1. Invalid API key :
Generate new key if needed
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
4. API service down :
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_KEY
Select all environments (Production, Preview, Development)
Solution for local :
Verify file is named .env.local exactly
Restart dev server after changes
Check .gitignore includes .env.local
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 :
Solution :
Verify Tailwind installation :
Verify import in layout.js:
Cooldown doesn't work
Symptom : Can send multiple messages without waiting
Solution :
Check browser console for JavaScript errors
Verify localStorage is enabled :
Refresh the page and try again
Cooldown stuck at 50 seconds
Symptom : Countdown never decreases
Solution :
Check browser console for errors
Check useEffect is working:
Messages not displaying
Symptom :
Send message but nothing appears
Solution :
Check browser console for errors
Verify API is responding :
Check network tab in DevTools:
What's the response status?
Verify useChat hook 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 :
4. Google AI API slow :
Consider different region
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)
Check Tailwind classes are correct:
Icons not showing
Symptom : Square boxes instead of icons
Solution :
Verify lucide-react is installed :
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:
Function timeout on Vercel
Symptom :
Cause : Vercel Hobby plan has 10-second limit
Solutions :
Option 1 - Upgrade to Pro ($20/month):
Option 2 - Reduce timeout :
Then adjust cooldown in app/app/page.js to match.
Option 3 - Use different host :
Domain not working
Symptom : Custom domain doesn't load
Solution :
Wait 24-48 hours for DNS propagation
Check if records are propagating
Verify in Vercel Dashboard :
Page loads slowly
Optimization checklist :
Symptom : Google AI bill is high
Solutions :
Check Google AI Studio quota
Getting More Help
If your issue isn't listed here:
Check the logs :
Vercel logs (if deployed)
Search GitHub Issues :
Someone may have solved it
Ask for help :
Include error messages and logs
Still stuck? Open an issuearrow-up-right with detailed information and we'll help you out!