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
In a project with .js files that import ESM functions from .ts files (an old codebase) I'm also hitting SyntaxError: The requested module ... does not provide an export named ... errors.
My codebase doesn't use "type": "module" in package.json yet. I am able to build and run the entrypoint with esbuild directly. I can also confirm the above error only happens in Node 22 or Node 23. But for Node 20, tsx handles this fine:
Acknowledgements
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.
The text was updated successfully, but these errors were encountered: