← 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
- AI edit removed or renamed a file but left the import.
- Missing shadcn/ui component file.
- Case mismatch in the file name.
How to fix it
Check the file exists at the path (the @ alias maps to src/ in Lovable projects).
Ask Lovable explicitly: "Create the missing file src/components/ui/x.tsx" or restore it from version history.
If editing locally, add a missing shadcn component:
npx shadcn@latest add dialog
Related errors
Get new fixes weekly
No spam. Unsubscribe anytime. Privacy