#40 most commonruntime/UILovableBolt.newCursorv0Windsurf

Element type is invalid: expected a string ... but got: undefined

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.

Paste your error →

What it means

The page tried to use a component that doesn't exist under that name. Usually a file was renamed, or a component is imported with the wrong style of import.

How to fix it: paste this prompt into your AI builder

Fix prompt for Lovable, Bolt, Cursor, v0, Windsurf
I'm getting "Element type is invalid ... got: undefined". Check the render method named in the error and every component it imports. For each, confirm the file exists and that default vs named imports match the export (import X from vs import { X } from). Also check icon imports (e.g. lucide-react) for icons that don't exist. Fix only the broken imports/exports.

If the AI can't fix it: manual steps

  1. Check if an icon name changed; icon libraries sometimes rename icons between versions.

Where this happens

Seen in these AI app builders and editors:

LovableBolt.newCursorv0Windsurf

Sources

Related runtime/UI errors

Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.

Fix my error →