"Module not found" for Existing File with Correct Casing

Current behavior:

Vercel build fails with the error:

Apply to jobStatusHel…Module not found: Can’t resolve ‘../../lib/jobStatusHelper’

even though the file exists in my repository, is tracked by git, and is referenced with the correct casing in all import statements. The build should succeed, as the file is present in the repository and the import paths are correct.

  • Framework: Next.js 14.2.29

  • Environment:

  • Local: macOS (case-insensitive filesystem)

  • Vercel: Linux (case-sensitive filesystem)

  • Vercel settings:

  • Build command: npm run build

  • Clean build cache attempted via vercel.json and env var

If you open your deployment in the Vercel dashboard and go to the “Source” tab, you can see the input and output that Vercel is working with. Check that to see if the jobStatusHelper is in the correct directory

One other thing to check is if you have a .vercelignore file, if this blocks any files your build logs should mention it and say what’s been excluded