VERCEL ERRORS

Module not found: Can't resolve on Vercel

Works locally, fails on Vercel with Module not found. The usual cause is a file name and an import that differ only in letter case. Two other causes are covered.

Module not found: Can't resolve './components/usercard'

What it means

Windows and macOS use case-insensitive file systems by default, so Header.tsx and header.tsx are the same file there. Vercel builds on a case-sensitive Linux file system, where they are two different paths. Vercel's guide calls a casing mismatch the almost-always cause of this error.

Git can hide the problem: on a case-insensitive system it often does not record a rename that only changes letter case.

How to fix it

  1. In the failed deployment's Build Logs, find the Module not found line and note the import path it names.
  2. Compare that path character by character with the real file name in the repository, not in your local file explorer.
  3. Make the import and the file name use the same casing, commit and redeploy.
  4. If Git never recorded the rename, rename through a temporary name so Git sees an explicit change. Commit both steps together.
  5. If the unresolved path is a package name, confirm the package is listed in package.json and committed.
  6. If the path is relative, count the ../ segments against the file's real folder depth. An editor with path aliases can hide a wrong path.
git config core.ignorecase false
git mv header.tsx header-tmp.tsx
git mv header-tmp.tsx Header.tsx

What a DeployDoctor scan can check

The broken imports check reports relative, @/ and tsconfig alias imports that point to files missing from the repository, including files that differ only by letter case. The dependencies check reports imported packages that are not declared in package.json. A scan reads the repository on GitHub, so it cannot confirm that your build passes.

Sources

Documentation last checked 2026-10-28. Vercel can change its documentation; confirm against the linked pages.