Common Bolt.new Errors and Their Fixes
AI-generated code isn't perfect. Here are the most common Bolt.new errors and how to fix them.
1. Build Failures
Error: npm run build fails
Cause: Missing dependencies or syntax errors
Fix: Look at the build log — scroll to the first error (not the last). Fix that, then retry.
2. Import Errors
Error: Cannot find module './X'
Cause: AI references non-existent files
Fix: Check the file exists and the path is correct. AI sometimes creates inconsistent imports.
3. Supabase Connection Errors
Error: Failed to fetch from Supabase
Cause: Missing or incorrect environment variables
Fix: Verify VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY are set correctly.
4. Component Rendering Errors
Error: Blank page or component crashes Cause: State management issues or missing props Fix: Check the browser console for React errors. Add error boundaries.
5. Tailwind Classes Not Working
Cause: Dynamic class names that Tailwind can't detect Fix: Use complete class name strings. Never construct them dynamically.
