Casing of ./types does not match the underlying filesystem
Asked Answered
A

5

8

So i had a bit weird warning from eslint

warning on vscode hints warning on vscode terminal

'./types' is a flow type file. I think eslint read checkbox as a lowercase while in reality it is Checkbox (capital C).

I try git mv casesensitive tmp && git mv tmp CaseSensitive as discussed here: In a Git repository, how to properly rename a directory? but it still doesnt work. because in the past that folder is lowercase (checkbox) and renamed to Uppercase (Checkbox) but it was work of other developer, i don't know what happen in his machine until this warning come in my machine. Maybe (another assumption) it was happen because of bad config of webpack/babel, im not sure.

Accrue answered 4/8, 2020 at 20:10 Comment(0)
W
4

Got the same issue, all I did was restart my editor (vscode). Hope this works out for you too.

also, try copying the content of the file, deleting the file, creating a new one, pasting your content, and importing accordingly

This kind of error can be frustrating.

but as it goes, if something doesn't work, and you have no clue, try switching it off and on again 😉

Wildfire answered 9/2, 2022 at 21:4 Comment(1)
lol it disappeared for me after restart, ty!Offstage
A
1

The index file must be in lowercase letters

Aggi answered 26/2, 2024 at 20:52 Comment(0)
G
0

I had a similar problem in my case I was importing a .js file in a .tsx extension file. so we can check the extension of the imported file.

Gasp answered 31/12, 2022 at 6:19 Comment(0)
H
0

It comes because Some times the file name is changed in which you are pushing Let's say your earlier filename is cancelOrder and then you change the name to CancelOrder and then try to commit the code it will throw the same error so revert the changes and then try.

Heinrike answered 13/1, 2023 at 11:38 Comment(0)
H
0

I did everything from Restarting VsCode to Restarting Eslint Server inside VScode. After lots of research I understood it's because of a git configuration, the file name case changes were being ignored. When the project was cloned, the default system config was to ignore cases for git.

you can check it by running

git config core.ignorecase

If it's true then git wont get any file name changes as diff, and then if by mistake any file name got changed ( only case ) then git will identify.

Hera answered 24/9, 2024 at 11:15 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.