TS1149

TS1149: File name differs from already included file name only in casing.

Broken Code ❌

This error occurs when you import the same file in two different files using two different casing styles (ex. camelCase and UpperCamelCase):

File A:

1
import { BaseTestPage } from './baseTestPage';

File B:

1
import { BaseTestPage } from './BaseTestPage';

Fixed Code ✔️

The error can be fixed by using the same casing style:

File A:

1
import { BaseTestPage } from './BaseTestPage';

File B:

1
import { BaseTestPage } from './BaseTestPage';

Alternatively, you can set forceConsistentCasingInFileNames to false in your “tsconfig.json” file:

tsconfig.json
1
2
3
4
5
{
"compilerOptions": {
"forceConsistentCasingInFileNames": false
}
}