← All errors · Lovable

Lovable/Vite: Failed to resolve import

Exact error

[plugin:vite:import-analysis] Failed to resolve import "@/components/ui/x" from "src/..." Does the file exist?

What it means

Vite cannot find a file the code imports, often after the AI renamed or deleted a component.

Likely causes

How to fix it

  1. Check the file exists at the path (the @ alias maps to src/ in Lovable projects).

  2. Ask Lovable explicitly: "Create the missing file src/components/ui/x.tsx" or restore it from version history.

  3. If editing locally, add a missing shadcn component:

    npx shadcn@latest add dialog

Related errors

Get new fixes weekly

No spam. Unsubscribe anytime. Privacy