What it means: You're trying to deploy the backend to Vercel (won't work)
Solution:
- Only deploy frontend to Vercel
- Deploy backend to Railway, Render, or VPS
- Update
vercel.jsonwith backend URL
What it means: SQLite database file doesn't exist (serverless has no persistent storage)
Solution:
- SQLite is incompatible with Vercel serverless
- Use Railway/Render/Fly.io for backend with persistent storage
What it means: CORS is blocking requests from Vercel domain to your backend
Solution:
- Update backend
.env:FRONTEND_URL=https://your-app.vercel.app - Redeploy backend
- Clear browser cache and try again
What it means: Invalid backend URL in vercel.json
Solution:
- Check
vercel.jsonrewritessection - Verify backend URL is correct and accessible
- Test backend URL in browser:
https://your-backend.com/api/health - Redeploy Vercel frontend:
vercel --prod
Common causes:
- Missing
npm installin frontend directory - Build command running in wrong directory
- Missing environment variables
Solution:
- Check
vercel.jsonhas correct paths:"buildCommand": "cd frontend && npm install && npm run build", "outputDirectory": "frontend/dist"
- Set environment variables in Vercel dashboard
- Check build logs for specific error
Possible causes:
- Backend not running
- Wrong backend URL in
vercel.json - CORS not configured
- Backend requires environment variable not set
Debug steps:
- Open browser DevTools → Network tab
- Try to login
- Check failed request URL - where is it going?
- Check response - what error message?
- Test backend directly:
curl https://your-backend.com/api/health
Solution:
- If 404: Update URL in
vercel.json - If CORS error: Update
FRONTEND_URLin backend - If 500: Check backend logs for errors
- If timeout: Backend may be sleeping (free tier), wait 30s and retry
Issue: VITE_API_URL not being used
Solution:
- Variable must be prefixed with
VITE_to be accessible in Vite - Set in Vercel dashboard: Project → Settings → Environment Variables
- Must redeploy after adding variables:
vercel --prod - Variable should NOT include
/apisuffix if using rewrites invercel.json
Common issues:
- Environment variables not set on hosting platform
- Database not initialized (run
npm run setup) - Port conflicts (use
process.env.PORT) - Missing
NODE_ENV=production
Solution:
- Check all env vars are set on hosting platform
- Check logs for specific error
- Ensure database file exists and is writable
- Verify persistent volume is mounted (Railway/Render)
- Check full guide: VERCEL_DEPLOYMENT.md
- Check Vercel logs:
vercel logs - Check backend logs on your hosting platform
- Test backend health:
https://your-backend.com/api/health - Verify CORS: Should return
Access-Control-Allow-Originheader
Frontend (Vercel)
↓ HTTPS
Backend (Railway/Render)
↓
SQLite Database (persistent volume)
Do this: Split frontend/backend deployment Don't do this: Try to run SQLite on Vercel serverless