Matched signals
- cannot find module
- module not found
- file not found:
- case-insensitive
- path is not a file
- capitalization
- wrong case
File path case mismatch
What this failure means
A file or module import path uses a different capitalisation from the actual filename on disk. On case-sensitive filesystems (Linux CI runners), this causes an immediate build failure.
Symptoms
Faultline looks for one or more of these log fragments:
cannot find module
module not found
file not found:
case-insensitive
path is not a file
capitalization
wrong case
Diagnosis
A file or module import path uses a different capitalisation from the actual filename on disk. On case-sensitive filesystems (Linux CI runners), this causes an immediate build failure.
Fix steps
-
Identify the mismatched import: compare the exact filename on disk with the casing used in the import statement.
-
Find all case variants of the file regardless of the current OS:
find . -iname "filename.ts" -not -path "*/node_modules/*" git ls-files | grep -i <filename> -
Rename the file or fix the import so the casing is consistent across the codebase — make the fix on a case-sensitive file system (Linux CI) where the mismatch is visible, not macOS where it is silently accepted.
-
Search the entire codebase for all occurrences before committing:
grep -rn "from.*[Ff]ilename" src/ -
For TypeScript projects, enable
"forceConsistentCasingInFileNames": trueintsconfig.jsonto catch future mismatches at compile time rather than only on case-sensitive file systems.
Validation
find . -iname "<filename>" -not -path "*/node_modules/*"returns exactly one result with the intended casing.- Re-run the build and confirm no case-sensitivity error.
Why it matters
macOS and Windows use case-insensitive filesystems by default. Code written on those platforms may use inconsistent capitalisation that goes undetected locally but breaks when the CI runner uses a case-sensitive Linux filesystem.
Prevention
- Enforce consistent file naming conventions with a linter.
- Run
git config core.ignorecase falseto make Git’s case-sensitive logic consistent with Linux. - Add a CI check for case collisions:
git ls-files | sort -f | uniq -Di. - Prefer one filename casing convention per language or package so imports are easy to review mechanically.
Try it locally
git ls-files | sort -f | uniq -Di
git ls-files | sort -f | uniq -Di
How Faultline detects it
Use faultline explain path-case-mismatch to see the full playbook.
faultline analyze build.log
faultline explain path-case-mismatch
Generated from playbooks/bundled/log/build/path-case-mismatch.yaml. Do not edit directly.