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
The tests should execute without triggering the TS6046 error when isolatedModules is enabled.
Actual behavior
With ts-jest 29.2.4 and typescript ^4.x, enabling isolatedModules causes the TS6046 error to occur, suggesting that --moduleResolution is not being interpreted correctly.
Debug log
It only throw error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.
Additional context
This issue seems to be related to how ts-jest handles TypeScript’s moduleResolution when isolatedModules is enabled. It may be that the TypeScript compiler options are not being correctly passed or parsed in this configuration.
Hoo93
changed the title
[Bug]:
[Bug]: Module Resolution Issue with ts-jest 29.2.4 and TypeScript ^4.x when using isolatedModules
Aug 23, 2024
Hoo93
changed the title
[Bug]: Module Resolution Issue with ts-jest 29.2.4 and TypeScript ^4.x when using isolatedModules
[Bug]: Module Resolution Issue with ts-jest 29.2.4 and TypeScript ^4.x when using isolatedModules option
Aug 23, 2024
Version
29.2.4
Steps to reproduce
jest
Expected behavior
The tests should execute without triggering the TS6046 error when isolatedModules is enabled.
Actual behavior
With ts-jest 29.2.4 and typescript ^4.x, enabling isolatedModules causes the TS6046 error to occur, suggesting that --moduleResolution is not being interpreted correctly.
Debug log
It only throw
error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.
Additional context
This issue seems to be related to how ts-jest handles TypeScript’s moduleResolution when isolatedModules is enabled. It may be that the TypeScript compiler options are not being correctly passed or parsed in this configuration.
Environment
System: OS: macOS 14.5 CPU: (12) arm64 Apple M2 Pro Binaries: Node: 22.4.1 - /opt/homebrew/bin/node Yarn: 1.22.22 - /opt/homebrew/bin/yarn npm: 10.8.1 - /opt/homebrew/bin/npm pnpm: 9.5.0 - /opt/homebrew/bin/pnpm npmPackages: jest: ^29.7.0 => 29.7.0
The text was updated successfully, but these errors were encountered: