You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a windows cmd prompt is opened with the lower case drive letter c:\ the build fails, but when the drive letter is capital C:\ it succeeds.
error:
File 'src\main.ts' is missing from the TypeScript compilation
ERROR File 'src\polyfills.ts' is missing from the TypeScript compilation
Ensure the file is part of the TypeScript program via 'files' or 'include' property
π Expected behavior
The build should succeed regardless of the case of the drive letter as they are case insensitive and do not effect portability to case-sensitive platforms. Also, the paths specified in code are relative and appear to be resolved to absolute paths by the compiler so there is not a way to fix this with changes to client code.
Additional information about the issue
This was noticed because we had a shortcut with a "start in" path starting with a lowercase c:\, but when cmd is opened using the run window (CMD+R, "cmd") the drive letter is uppercase C:\. The build would consistently fail from the cmd window launched via shortcut until the "start in" path was changed to uppercase. In our case this was a simple workaround, but there are situations (e.g. CI/CD) where the user may not have control over the environment's drive letter case.
The issue did not occur on TypeScript 4.9.5 and began happening when we recently upgraded to 5.2.2
It appears a similar issue was raised before and fixed (in 2019), but that was related to forceConsistentCasingInFileNames. However, I set this value to false in our tsconfig and the build still failed. It would only succeed if the cmd window path started with a capital drive letter.
π Search Terms
drive letter case sensitive windows
π Version & Regression Information
β― Playground Link
No response
π» Code
// Your code here
π Actual behavior
When a windows cmd prompt is opened with the lower case drive letter
c:\
the build fails, but when the drive letter is capitalC:\
it succeeds.error:
π Expected behavior
The build should succeed regardless of the case of the drive letter as they are case insensitive and do not effect portability to case-sensitive platforms. Also, the paths specified in code are relative and appear to be resolved to absolute paths by the compiler so there is not a way to fix this with changes to client code.
Additional information about the issue
This was noticed because we had a shortcut with a "start in" path starting with a lowercase
c:\
, but when cmd is opened using the run window (CMD+R, "cmd") the drive letter is uppercaseC:\
. The build would consistently fail from the cmd window launched via shortcut until the "start in" path was changed to uppercase. In our case this was a simple workaround, but there are situations (e.g. CI/CD) where the user may not have control over the environment's drive letter case.The issue did not occur on TypeScript 4.9.5 and began happening when we recently upgraded to 5.2.2
It appears a similar issue was raised before and fixed (in 2019), but that was related to
forceConsistentCasingInFileNames
. However, I set this value to false in our tsconfig and the build still failed. It would only succeed if the cmd window path started with a capital drive letter.Previous Issue: #31327
Previous PR: #31503
The text was updated successfully, but these errors were encountered: