'File name differs from already included file name only in casing' on relative path with same casing

Solution 1:

For me, the issue occurred when a file was quickly renamed from someFile.ts to SomeFile.ts. Restarting my IDE (Visual Studio Code) made the warning go away.

Solution 2:

In my case, the error was in the import statement. The import statement had a capital letter instead of small letter, which worked during develop in Windows, but not when compiling for production.

wrong:

import {SomeClass} from '/some/path/SomeClass.ts';

correct:

import {SomeClass} from '/some/path/someClass.ts';

Solution 3:

You need to disable the "forceConsistentCasingInFileNames" in the tsconfig.json file.

So you should have something like that:

{
  "compilerOptions": {
    ...
    "forceConsistentCasingInFileNames": false,
    ...
  }
}