- Any AI tool
Fix errors when the AI gets stuck
How to read an error, paste it so the AI can fix it, go back to a working version, and split big tasks and prompts so the AI stops looping.
Beginner 4 min read7 steps
Every AI builder gets stuck sometimes. The preview goes blank, a red error appears, or the AI “fixes” the same problem five times without success. That's normal — and almost always solvable without knowing how to code.
This guide gives you a calm, step-by-step routine: find the error, hand it over properly, go back when needed, and break the work into pieces the AI can handle.
What you'll build
- A routine for any error: read it, copy it, paste it with context.
- Know when to fix forward and when to go back to a working version.
- Prompts that get the AI out of a loop.
Step 1: Find the actual error message
“It doesn't work” is hard for anyone to fix. The AI needs the exact message. Look in these places:
- In the preview
- Builders often show a red error overlay or a “Fix” / “Try to fix” suggestion. Copy the full text.
- Browser console
- Right-click the page, choose Inspect, and open the Console tab (or press F12, or Cmd+Option+J on a Mac with Chrome). Red lines are errors.
- Terminal
- In Cursor or Claude Code, errors from
npm run devornpm run buildappear in the terminal. Copy from the first red line down.
Step 2: Read it (a little)
You don't have to understand the error, but three parts help you and the AI:
- The message — e.g.
Cannot find module 'motion/react'orx is not defined. - The file and line — e.g.
src/components/cart.tsx:42. - When it happens — on page load, after clicking a button, only on mobile.
Some common messages in plain words:
- Module not found
- A package isn't installed or a file path is wrong.
- … is not defined
- The code uses something it never created or imported.
- Hydration mismatch
- The page looks different on the server than in the browser — often dates, random numbers or browser-only code.
- Type error
- A value has the wrong shape, e.g. text where a number was expected.
- The message — e.g.
Step 3: Paste the error with context
Error report Something broke after your last change. What I did: [clicked “Add to cart” on a product page] What I expected: [the cart opens with the product] What happened: [the page went blank] Error: [paste the full error message here] Please find the cause and fix it. Don't change the design or anything unrelated.
Step 4: If it fixes the same thing over and over
After two or three failed attempts, more of the same won't help. Change the approach:
Step back Stop making changes. Explain in plain words what you think is causing this error, list two or three possible causes, and tell me how we can check which one it is.
Add logging Add temporary console.log statements around [the cart logic] so we can see what's happening. I'll run it and paste the output back.
Simplify Undo your last attempts at fixing this. Then solve the problem the simplest possible way, even if it's less elegant.
If the chat is very long, the AI can lose track of earlier details. Start a new chat in the same project and describe the current problem from scratch.
Step 5: Go back to a working version
Sometimes the fastest fix is to undo. Every tool can do this in some way:
- Lovable, Bolt and v0 keep a history of versions. At the time of writing you can restore an earlier version from the chat or the project history.
- Cursor can restore checkpoints from earlier in the Agent chat, and you can reject changes before accepting them.
- Claude Code can rewind the conversation and code to an earlier point (at the time of writing: press Esc twice).
- Git works everywhere: ask the agent to commit after each working step, so you can always return.
Save points From now on, after each change that works, create a git commit with a short message describing it.
Step 6: Split big tasks into small ones
“Add accounts, payments, an admin panel and translate everything” in one message is the most common reason AI tools get stuck. Do one thing, check it, then the next:
One huge request
- Add login, a customer dashboard, order history, email notifications and Stripe payments
Small steps
- 1. Add email sign-in
- 2. Add a “My orders” page that lists orders
- 3. Send a confirmation email after an order
- 4. Add Stripe checkout
Let the AI plan I want to [add customer accounts with order history]. Break this into small steps that can each be tested on their own. Don't write code yet — just list the steps.
Step 7: Send big prompts in parts
Browser AI builders limit how long one message can be. Fazekit handles this for you: for big templates and apps, the Build with AI panel splits the prompt into numbered parts.
- Send part 1. The AI should only reply that it received it.
- Send each next part the same way.
- After the last part, the AI builds everything at once.
If it starts too early Please wait — I'm sending the code in several parts. Don't write or change anything until I send the part marked “last part”. Just confirm each part.
Keep going
Back to building
Stuck with a specific Fazekit item? Copy its prompt again — sometimes a clean start with a different tool is the quickest fix.
Build with AI — start pageNext guide
Publish your site and connect your own domain
Put your AI-built site online with your builder's publish button or Vercel/Netlify, then connect a domain — DNS explained with Cloudflare as an example.
← All guides·Last reviewed 24 September 2026