VibeDict

🧩Tried to run something that isn't a function

What you'll see
TypeError: items.map is not a function

The code tried to call something like a function, but it can't be run. For example, using .map() on a value that isn't a list (array) causes this error.

🤔 Why does it happen?

  • The data is an object or text, not a list (array)
  • There's a typo in the function name, or the import is wrong
  • A different library version renamed the function

🔧 Try this

  1. Use console.log to check what the first part of the name in the error (for example, items) really is
  2. Check that the import line is correct
  3. Show the AI what the data actually looks like

🤖 Ask your AI like this

I get the error below. Please check what that value really looks like, and fix it so the screen doesn't break even when it isn't a list. [Paste the full error here]

Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.

Related terms

Other errors in this group