-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPL with ES modules #1924
Comments
I see last release v10.9.1 many months ago (Jul 14, 2022). Was this fixed? When will it be released?
package.json:
tsconfig.json
|
Unfortunately, this is not actually fixed! In latest ts-node I get the exact same behavior. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search Terms
Is there a way to use ts-node REPL with ES modules?
Expected Behavior
const u = await import('./Util')
should work in the REPL when package type is "module" and Typescript is transpiling to ES modules.
Actual Behavior
Tried it without await:
Adding '.js' extension does not help:
Steps to reproduce the problem
npx ts-node-esm
( the first line always throws an error. Then the next one might work:
Minimal reproduction
Specifications
package.json:
https://github.com/felipeplets/esm-examples/blob/61e11ac535a45a6c1f0f2bf5499e40d622c8c8cd/package.json
Operating system and version: macOS 12.5.1
If Windows, are you using WSL or WSL2?:
The text was updated successfully, but these errors were encountered: