Skip to content

Conversation

@hk2166
Copy link

@hk2166 hk2166 commented Dec 2, 2025

#5555
When ts-node or similar TypeScript compilers encounter a type error,
the error was being caught and masked by fallback module loading logic,
resulting in unhelpful "Cannot find module" messages instead of the
actual TypeScript diagnostics.

This fix detects TypeScript compilation errors by checking for TS-specific
patterns in error messages and throws them immediately without attempting
fallback mechanisms, preserving the full diagnostic information for users.

Fixes issue where TypeScript errors in imported modules showed as
"Cannot find module" rather than displaying the actual type error.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 2, 2025

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: hk2166 / name: Hemant (fcb0816)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant