-
Notifications
You must be signed in to change notification settings - Fork 12.8k
TypeScript language service breaks down when wrong casing is used for imports #5430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
looks like #5149. I do agree a better experience is needed here. |
@vladima, what can we do here? |
thanks to @vladima, this is not a duplicate, this is a bug in tsserver. fix queued. |
The issue is that tsserver was using a case sensitive map to store files, so looking up a file with a different case did not work. this should be fixed in TS 1.7, by #5436. Now ideally, you would want a warring if you reference a module with the wring case, for this use the new flag |
Fix #5430: Use FileMap to store file list in tsserver
@mhegazy Thanks for the quick fix! 👍 |
Copied from: https://code.visualstudio.com/Issues/Detail/20178
I was experiencing a bizarre issue where the TS language service broke down and wouldn't underline errors in my code. After pulling my hair out for half an hour, I figured out it was because I was doing a file import with the wrong case e.g.
import Engine from "./Engine"
instead of
import Engine from "./engine"
The default class exported was named 'Engine' which I think might have also had something to do with it.
Open the attached folder in VS Code, then pick the "engine.ts" file and notice that there is an undefined symbol ("jjj_this_is_an_error") that is not red underlined.
I would expect a better error on the erroneous import instead of the imported file no longer having proper language services. :)
The text was updated successfully, but these errors were encountered: