🔎 What you'll see
(the same error keeps coming back, or something else breaks)
🤔 Why it happens
As a conversation gets long, the AI mixes up earlier code with the current code, and pasting partial fixes over and over tangles the file. If you only say "it doesn't work" without the error message, it has to guess.
🛠️ How to fix it
- Start a new conversation and give it the whole current file plus the exact error message in one go.
- Set the order: "Explain the cause first, then give me the complete fixed file."
- Ask for one fix at a time.
- Keep a copy of the last working version (a git commit) and go back to it if things break.
🤖 What to ask your AI
Replace the parts in [ ] with your own details, then paste it in.
Let's start fresh. I'm building [description], and here's the whole current file: [code]. I get this error: [full error]. First explain the cause, then give me the complete fixed file. Don't change any other features.
Other errors
CORS errorThe browser blocks your page from fetching data from another site404 Not FoundThe address or file can't be foundundefined / Cannot read properties of undefinedReading a property of a value that isn't thereis not definedUsing a name that was never declaredSyntaxErrorBrackets or quotes don't match upExposed API keyYou put a secret key in your code or on GitHubMixed ContentAn https page loads something from an http addressBlank white pageYou deployed it and all you see is a blank screenis not a functionCalling something that isn't a functionUnexpected token < in JSONYou expected JSON but got HTMLCannot use import statement outside a moduleThe browser won't accept your import statementfavicon.ico 404The console shows a 404 for favicon.icoData disappears when I refreshYour to-dos or scores aren't being savedPage looks broken or tiny on phonesFine on a computer, weird on mobilegit push rejectedA "rejected" / non-fast-forward errornpm: command not foundYour terminal says npm or node doesn't existPort 3000 is already in useYour dev server says the port is takenEnvironment variables (.env) aren't loadingYou put your API key in .env but it comes out undefined