Skip to content

Node22 under ESM, tsx running error? SyntaxError: The requested module '../a.js' does not provide an export named 'TestService'? #702

@zurmokeeper

Description

@zurmokeeper

Acknowledgements

  • I read the documentation and searched existing issues to avoid duplicates
  • I understand this is a bug tracker and anything other than a proven bug will be closed
  • I understand this is a free project and relies on community contributions
  • I read and understood the Contribution guide

Minimal reproduction URL

https://github.com/zurmokeeper/20250228-tsx-node22-bug

Problem & expected behavior (under 200 words)

Node v22.12.0 Executing npm run test in the root directory, reports an error.

SyntaxError: The requested module '../a.js' does not provide an export named 'TestService'

Not so under node 20.18.1, tsx version v4.19.3.

Image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions