← All errors · LovableLovable & Bolt app errors

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

Prevent this next time

FAQ

What does "Lovable/Vite: Failed to resolve import" mean?

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

What usually causes it?

AI edit removed or renamed a file but left the import. Missing shadcn/ui component file. Case mismatch in the file name.

How do I 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:

Related errors

Get new fixes weekly

No spam. Unsubscribe anytime. Privacy