Build errors
Building with Lovable makes coding faster and more intuitive, but even the best AI development tools can occasionally hit a snag. Sometimes your code won’t run as expected, or you might notice unexpected behavior where the AI interprets your intent incorrectly. Here’s a step-by-step guide to help you navigate issues and get back on track:1
Use the Try to Fix Button First
Click the Try to Fix button when an error shows up. Lovable will scan your logs, detect the issue, and attempt a quick fix. It’s your fastest first move. If that doesn’t work, it’s time to dig deeper.
2
Diagnose Unexpected Behavior
Your code may run without errors but not behave as intended. That’s unexpected behavior, harder to spot and harder to fix. Try this:
- Revert and re‑prompt: Roll back to just before the issue occurred, then try a clearer, revised prompt.
3
Write More Effective Prompts
Clear, structured prompts lead to better results. Use this format:
- Use Chat Mode and ask, “Can you outline the steps or plan for this feature?”
- Review the plan that Lovable suggests, ask for changes or clarifications if needed.
- Prompt Lovable: “Now, let’s build this step by step.”
4
Build in Logical Order
Structure matters. Follow this recommended flow:
- Create layout and pages.
- Connect to Lovable Cloud or an external Supabase connection.
- Set up authentication and user roles.
- Plan and organize feature logic.
- Prompt Lovable to implement features.
General issues
Need some quick help?
Need some quick help?
Jump into Chat-Only Mode and type: “This specific function is not working. Can you walk me through what’s happening and what you’ve tried?”
UI or Layout Problems
UI or Layout Problems
- Provide screenshots of the UI issue directly to the AI for a clearer diagnosis.
- Use the Edit tool to select and highlight specific UI features you want to change, then describe the adjustment you want.
- For example: “See the highlighted element? Center it vertically and increase padding.”
When completely stuck
When completely stuck
- Prompt: “Take a step back. Analyze the error and suggest a different approach.”
- Break the task into smaller parts.
- Use the revert button if errors persist.
Not found preview or spinning up sandbox
Not found preview or spinning up sandbox
Issues with the preview not found or the sandbox spinning up can be related to either the sandbox environment or your connection.
Sandbox problems are often temporary, try a hard refresh first. If this continues, it may indicate a broken sync with GitHub or a connection issue.
For persistent issues, review our GitHub integration guide.
Core functionalities
Preview is white
Preview is white
- These are often the result of issues in the vite.config.ts file or that security headers have been introduced into the project.
- Build errors or syntax errors in the code
- JavaScript runtime errors causing crashes
- Missing dependencies or broken components
- Authentication or routing issues blocking the page
Unpublish or deactivate projects
Unpublish or deactivate projects
You can unpublish or delete your project in Project Settings.
Error with Edge Functions
Error with Edge Functions
Check the Cloud tab -> Logs for specific error messages. Verify all required secrets and environment variables are properly configured.
Try redeploying by making a small change to the edge function code by prompting Lovable. Ensure your database connection is working.
Ask Lovable to investigate the specific error and fix any issues found in the logs.
Project not found
Project not found
This usually means the project was deleted. If you didn’t delete it on purpose, please reach out to support for help restoring your project.
Need more help?
Still stuck? Try this:- Use chat mode for step-by-step help.
- If it’s an issue with the UI or a feature, revert back to a stable state.
- If you’re a paid customer and want to report a platform-wide issue, contact Support.