Skip to content

Compilation fails with TS6059 under Windows 10 but passes under Windows 11 or LinuxΒ #57926

Closed
@brodziakm

Description

@brodziakm

πŸ”Ž Search Terms

"TS6059", "Windows 10"

πŸ•— Version & Regression Information

⏯ Playground Link

No response

πŸ’» Code

No response

πŸ™ Actual behavior

When compiling under Ubuntu Linux (containerised or via WSL), or on Windows 11: compilation of all modules is successful.

When compiling under Windows 10: compilation fails with TS6059 errors.

πŸ™‚ Expected behavior

Compilation is successful on all operating systems.

Additional information about the issue

We discovered this problem on a large existing Angular codebase a few days after updating to Angular 17.3 along with TypeScript 5.4.3. We didn't discover this immediately because our CI processes run in Linux, and the build passes quite happily under this OS.

To narrow down the issue I have tried retaining Angular 17.3 but downgrading to Typescript 5.3.3, and the build passes on Windows 10. I then tried various nightly builds and found that:

  • The build is successful when using TypeScript 5.4.0-dev.20231221
  • The build fails when using 5.4.0-dev.20231222

We subsequently tried building on a Windows 11 workstation (it passes), and via a WSL Ubuntu terminal (it also passes).

This leads me to believe that the changes under #55015 might have had an unexpected impact, particularly with regards to case insensitive paths specifically on Windows 10. I don't believe that Angular 17.3 has caused the problem because the problem does not exist when compiling under different versions of TypeScript.

I have been unable to narrow down a minimal reproduction of the problem because, other than the different operating system, it isn't clear what the specific problem is in the code.

For what it's worth, the Angular project is broken down into multiple libraries, and each library has multiple secondary entry points. We see one of the library secondary entry point builds fail with TS6059, but only under Windows 10. Some upstream libraries and library secondary entry points build correctly.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions