VIBE⌇BRATOR
Take the Vibe Check
Error explained

Cannot read properties of undefined

TypeError: Cannot read properties of undefined (reading '…')

Your code read a property from something that was undefined at that moment.

What it means

The code did something.name, and something was undefined (or null, which gives the same error with a different word). The name in brackets is the property it tried to read. The value to the left of it is the one that was missing. Chrome and Node.js word it this way. Firefox says "x" is undefined, and Safari undefined is not an object.

Common causes

Ways to fix it

A prompt to fix it

Paste it into your AI coding tool and fill in the parts in angle brackets. It asks the tool to find the cause and show you before it changes anything.

Paste it, then fill in the <angle brackets>
I get: TypeError: Cannot read properties of undefined (reading '<property>')
<paste the first lines of the stack trace>

1. Go to the exact file and line in the stack trace and tell me which value is undefined there.
2. Trace where that value comes from and tell me why it is undefined at that moment: not loaded yet, a different shape than expected, an empty list, or a misspelled name. Show me the evidence, for example by logging the real value.
3. Fix the cause. If the value can legitimately be missing for a moment (data still loading), handle that case on purpose, for example with a loading state. Do not add ?. everywhere to hide the error.

How to check it is fixed

Tested prompts that help

Sources

Everything above comes from these pages. We read them on September 27, 2026; if one has changed since, it wins.