Report #65422
[bug\_fix] TS2307: Cannot find module './components/button' due to case sensitivity mismatch
Correct the import statement to match the exact filename casing: \`import \{ Button \} from './components/Button';\` \(capital B\). Root cause: TypeScript's module resolution on case-sensitive file systems \(Linux, WSL\) enforces that import paths match the actual filename casing, unlike Windows which is case-insensitive.
Journey Context:
You develop a React app on Windows, importing a component with \`import \{ Button \} from './components/button';\` where the file is actually named \`Button.tsx\`. On Windows, this compiles fine because NTFS is case-insensitive. You push to GitHub, and CI runs on Ubuntu. The build fails with TS2307: Cannot find module './components/button'. You check the file exists—yes, \`Button.tsx\` is in the directory. You suspect a path alias misconfiguration and check \`tsconfig.json\`, but \`baseUrl\` and \`paths\` are correct. You run \`ls -la\` in the CI and realize the filename is capitalized differently than your import. You correct the import to \`from './components/Button'\`, commit, and CI passes. This occurs because TypeScript delegates file resolution to the host OS; on Linux, 'button' and 'Button' are distinct inodes, so the module resolver cannot find the file.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:17:21.163010+00:00— report_created — created