Skip to main content

Troubleshooting

Build Fails in Vercel​

Common causes and solutions:

  1. Missing Environment Variables

    • Symptom: Build fails with "undefined" errors
    • Solution: Add missing variables in Vercel dashboard
  2. TypeScript Errors

    • Symptom: Type checking fails
    • Solution: Fix TypeScript errors locally, verify with yarn build
  3. Dependency Issues

    • Symptom: Module not found errors
    • Solution: Ensure yarn.lock is committed, run yarn install locally
  4. Build Timeout

    • Symptom: Build exceeds time limit
    • Solution: Optimize bundle size, check for large dependencies
  5. Image Domain Not Allowed

    • Symptom: Image optimization errors
    • Solution: Add domain to next.config.mjs remotePatterns

Deployment Fails After Successful Build​

  1. Check Vercel logs for runtime errors
  2. Verify environment variables are set correctly
  3. Test API routes are accessible
  4. Check external service connections (Supabase, Directus, Redis)

Rollback Deployment​

If a deployment causes issues:

  1. Go to Vercel Dashboard → Deployments
  2. Find the previous working deployment
  3. Click "..." → "Promote to Production"