Skip to content

Add warning for ts-node/esm usage#5381

Merged
DavertMik merged 3 commits into4.xfrom
bugfix/ts-node-esm-usage
Jan 20, 2026
Merged

Add warning for ts-node/esm usage#5381
DavertMik merged 3 commits into4.xfrom
bugfix/ts-node-esm-usage

Conversation

@DenysKuchma
Copy link
Collaborator

Problem

When using ts-node/esm with "module": "esnext" in tsconfig.json, users get "Cannot find module" errors because imports without file extensions don't work.
This is a known limitation of ts-node/esm, not a bug in CodeceptJS, but users don't understand what's happening. #5323

Solution

Add a warning message when ts-node/esm is detected in the config. The warning:

  • Explains the limitation clearly
  • Recommends tsx/cjs as an alternative
  • Links to documentation

@DenysKuchma DenysKuchma requested a review from DavertMik January 12, 2026 21:13
@DenysKuchma DenysKuchma requested a review from DavertMik January 15, 2026 11:51
@DavertMik DavertMik merged commit 9cca480 into 4.x Jan 20, 2026
10 checks passed
@DavertMik DavertMik deleted the bugfix/ts-node-esm-usage branch January 20, 2026 01:05
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.

2 participants