-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
"Parsing error: File 'tsconfig.json' not found" when path has any caps and is on non-system drive (C:). #1580
Comments
can you share it? |
Sorry - forgot to add the link. https://github.com/matracey/typescript-eslint-caps-path-issue-repro |
Ok, i got a little busy with other stuff, but i'm on it now, -> it's wierd i'm doing most of my tests on windows on D or E partition and usually they have some capital letters i'v tried to reproduce this issue with repo that you provided and i don't see any issues when executing eslint in
same goes for
there can be one issue, that your path is to long, (windows by default support only 260 chars in full path), you can change this easily in group policy if you are pro/enterprise user or in registry if you have home version |
I don't think it's a Strangely enough, adding the
I'm thinking I can try to debug the part of |
I've debugged the
Inspecting the |
Ah, I've found the problem. In the file For some reason on my machine, running |
Digging deeper, it looks like there was a folder-level case sensitivity feature introduced in Windows 10 in support of WSL. See this blog post for more details. I can check if the case sensitive attribute is enabled for the directory by running the command
In contrast, here's what I see when I run it for the same folder on my C: drive.
I didn't turn this on for this folder - I actually cloned the repo directly from GitHub to this location, so it was turned on by default somehow. I can turn it off and |
On a system that respects case in file/folder names, the casing is important. So there is obvs a difference between However on a system that does not respect case in file/folder names, the casing does not matter. So there is no difference between We can only really rely upon what node and TS tells us. If I'm not sure what the best solution is here. |
there is none, windows by default does not have this enabled and most tools is not going to work with this enabled, same goes for some apps, when NTFS partition is used, you can enable case sensitivity per directory by running command in powershell, $ fsutil.exe file setCaseSensitiveInfo "C:\foo" enable you can also check it by running $ fsutil.exe file queryCaseSensitiveInfo "C:\foo" and disable it by running $ fsutil.exe file setCaseSensitiveInfo "C:\foo" disable that being said it's not bug in our package or typescript, but rather system configuration incompatibility. |
I don't really understand why this would be the case. In my particular instance, I'm not specifying any path to Clearly Windows is now an environment where case sensitivity is respected in some instances. I would have said the solution would be to remove this normalization process altogether as I can't see a scenario where it would be required, unless you happened to know of a scenario that says otherwise? |
this feature is not new its since ~early (1Q) 2018 |
See the examples in my comment #1580 (comment) Imagine this case. There is a file with the path in this exact case: If the user types in
As mentioned in my comment, we cannot rely on all sources of filenames to return the same casing on a case insensitive system. So without normalisation we can and will miss the caches, causing errors when there shouldn't be. I know, because I wrote that code. I tested this thoroughly on macos which is case insensitive. I ran into edge cases and errors and I wrote that code that mirrors what typescript does for good reason.
This isn't something to take up with us though. This is up to typescript. As armano mentioned - there are tracking tasks in TS for this. We will always mirror TS here. See here where TS does its checks to see if the filesystem is case sensitive. Note how they hard code the check for windows, irrespective of the filesystem settings. |
there is also rejected ticket at node about this "feature"
|
What code were you trying to parse?
What did you expect to happen?
I expected the tslint.json file to be parsed and for the eslint results to be returned.
What actually happened?
I received an Parsing error: File 'tsconfig.json' not found.
I have created a repository where the issue can be easily reproduced by cloning on Windows to a drive that isn't your system drive (C: in most cases).
Versions
@typescript-eslint/parser
^2.19.0
TypeScript
~3.7.5
ESLint
^6.8.0
node
13.7.0
npm
6.13.6
The text was updated successfully, but these errors were encountered: