#3 most commonbuildLovableBolt.newCursorReplitWindsurf
Failed to resolve import "..." from "src/...". Does the file exist?
[plugin:vite:import-analysis] Failed to resolve import "@/components/ui/button" from "src/pages/Index.tsx". Does the file exist?
Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.
Paste your error →What it means
A page is trying to load another file or package that isn't there. Either the file was renamed or deleted (often by the AI itself), the path is spelled differently, or a package was never installed.
How to fix it: paste this prompt into your AI builder
Fix prompt for Lovable, Bolt, Cursor, Replit, Windsurf
Vite says "Failed to resolve import". Look at the exact import path in the error. If it's a package name (no ./ or @/), install that package with npm and add it to package.json. If it's a local file, check whether it was renamed, moved or deleted, and fix the import to point at the real file (matching exact upper/lower case) or recreate the missing file if other code depends on it. Check the rest of the project for other imports of the same missing file. Do not touch unrelated files.
If the AI can't fix it: manual steps
- In code view, check that the file named in the error really exists at that path with exactly the same capitalisation.
- If it's a shadcn/ui component (components/ui/...), ask the AI to add that specific component.
Where this happens
Seen in these AI app builders and editors:
LovableBolt.newCursorReplitWindsurf
Sources
Related build errors
Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.
Fix my error →