shawnbu
shawnbu11mo ago

File differs only by case error

I'm getting a strange error from TypeScript. For some reason it thinks the case of my file name is different and it's causing problems with check and when running.
Says file differs only by case. How can I resolve this? I don't have access to Deno's ts config or cache or anything (that I'm aware of)
No description
6 Replies
abi
abi11mo ago
Had this issue a few times, it’s not Deno-specific, I think it’s TS. I Google my way to the solution every time it happens. There’s solutions on Stack Overflow.
NDH
NDH11mo ago
I get this error if I change a filename while in VS Code by case. Util.ts to util.ts. The only way to clear it was to close and re-open VS Code. I'm on Windows.
shawnbu
shawnbu11mo ago
That's annoying because I don't have any control over it. Deno check returned the error also but I got it resovled by deleting all the files in my repo and piece by piece copy pasting the code back into empy files. Lucky I just got the repo started and there were only a few files. Once I convert all the NodeJS to Deno there will be like 1000's of files. Hopefully this won't happen often.
NDH
NDH11mo ago
I've also found that while in VS Code, you can just rename the offending file with an extra char xUtils.ts and then rename it again utils.ts, and the error goes away.
shawnbu
shawnbu11mo ago
I'll try that next time. I'm using webstorm but if it's an ide issue it might work
NDH
NDH11mo ago
I think it comes from Deno LSP but not sure.