Avatar ·

TypeScript error: "File name differs from already included file name only in casing" on Windows

Hi everyone! I'm new to TypeScript and encountered a strange error when compiling a project on Windows. I have a project with the following folder structure: ``` src/ Components/ Header.tsx header.ts App.tsx index.ts ``` I'm importing the Header component in App.tsx: ```typescript // App.tsx import Header from './Components/Header'; ``` But when running tsc, I get this error: ``` error TS1149: File name 'C:/project/src/Components/header.ts' differs from already included file name 'C:/project/src/Components/Header.tsx' only in casing. ``` I understand that on Windows the file system is case-insensitive, but I'm absolutely sure I have a file Header.tsx (with a capital letter), and header.ts is a different file. Why is TypeScript confusing them? And how can I fix this?