Vercel build logs (works locally, fails on Vercel)
Module not found: Error: Can't resolve './components/Button' in '/vercel/path0/app'
- What it means
- The uppercase/lowercase letters in an `import` path don't exactly match the file's real name. Mac and Windows ignore case, but Vercel's Linux servers require an exact match.
- Likely causes
- Importing
./components/Buttonwhen the file on disk is namedbutton.tsx. - Renaming a file from
Header.tsxtoheader.tsxwithout usinggit mv, so Git kept the old casing.
- Importing
- Prevention
- Name component and utility files consistently in lowercase with hyphens (
user-card.tsx).
Copy for your agent
The build works on my computer but fails on Vercel with `Module not found`. Check the exact uppercase/lowercase filename in Git (`git ls-files`) against the import path and fix it.
Was this page helpful?