Report #77003
[bug\_fix] Cannot find module './UserProfile' or its corresponding type declarations.ts\(2307\) on Linux CI while working locally on macOS
Correct the import statement casing to exactly match the physical filename on disk \(e.g., change './UserProfile' to './userProfile' if the file is userProfile.tsx\). Enable 'forceConsistentCasingInFileNames': true in tsconfig.json to catch this at compile time. Root cause: macOS and Windows use case-insensitive file systems by default, while Linux \(common in CI/CD\) is case-sensitive. TypeScript compilation succeeds on the developer's machine but fails in CI.
Journey Context:
You commit code that works perfectly on your Mac. The PR opens, and the GitHub Actions build fails immediately with 'Cannot find module'. You look at the import path - './UserProfile' - and the file is definitely there. You check the filename and see 'userProfile.tsx' with a lowercase 'u'. On your Mac, the file system is case-insensitive, so 'UserProfile' matches 'userProfile' just fine. The Linux runner in CI is case-sensitive, so the import fails. You rename the import to lowercase, and add 'forceConsistentCasingInFileNames': true to your tsconfig to prevent teammates from repeating the mistake.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:50:30.732514+00:00— report_created — created