Reading an error
Your app crashed with an error forty lines long. You're about to paste all of it into your AI for the fourth time.
This answers: How do I read an error message? No coding needed. 3 quick decisions.
- Reading code
- Debugging without panic
- Supervising your AI
Step 1 of 3
Which lines tell you the most?
TypeError: Cannot read properties of null (reading 'email') at ProfileCard (src/components/profile-card.tsx:12:31) at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at mountIndeterminateComponent (node_modules/react-dom/cjs/react-dom.development.js:20074:13) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21587:16) … 35 more linesHow do I read an error message?
Read the first line for what went wrong, then find the first line that points into your own files, not node_modules, for where. 'Cannot read properties of null (reading email)' means the thing before .email was empty. Tell your AI the file, line and what was empty, and ask it to find the cause before changing code.
Breaks at Browser: Code read .email from nothing
Why AI tools write this bug
When given a whole error with 'fix it', AI tools tend to guess, often silencing the symptom with ?. or try/catch instead of finding why the value was empty.
How to fix it
- Read the first line of the error.
- Find the first line in your own files.
- Name the empty or wrong value in plain words.
- Ask your AI to explain the cause before it fixes.
Check your own app
Paste this into Lovable, Cursor or Claude Code:
Without changing anything, look at the most recent error in this project's logs or terminal output. Tell me in plain English what it means, the first line that points to our own code, what value was empty or wrong there, and two possible causes. Don't fix anything yet.
Common questions
- What is a stack trace?
- The list of functions that were running when the error happened, newest first. Lines in node_modules are the framework; the ones in your own files are where to look.