Build works on your computer but fails on Netlify? Check file name capitals
Ship ItChecked against the official source
Source checked 10 Oct 2026 · Published 23 Oct 2026 · Last reviewed 23 Oct 2026 · By Ctrl+Z Therapy (how we test)
The short answer
Netlify's troubleshooting docs say that if you develop on Windows or OSX, the Netlify build may fail because the file system used in Netlify builds is case sensitive while your build environment is not. So an import with the wrong capitals can fail on Netlify, even though the file is right there. Netlify adds that the error messages may not clearly indicate this.
What to do
- Make each import and its file name match exactly, letter for letter. For example, an import of './header' fails there if the file is named 'Header.jsx'.
- Changing only the case of a file name? Use git mv (or git rm and add the file again). Netlify says plain renaming and committing may not work.
- Ask your AI tool: "My build fails on the host but works locally. Check every import path against the real file names in the repo, including upper and lower case, and fix mismatches with git mv."
Good to know
- Render gives the same advice for Module Not Found errors: make sure all file paths, names, and extensions are cased correctly.
Source
Checked on 10 Oct 2026. Prices, limits and settings change, so check the source before you rely on them.