Skip to content
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

Run error under node v14.5.0 version #11

Closed
kukudeshiyi opened this issue Oct 16, 2021 · 3 comments
Closed

Run error under node v14.5.0 version #11

kukudeshiyi opened this issue Oct 16, 2021 · 3 comments

Comments

@kukudeshiyi
Copy link

Hi,
I am using tsm under node v14.5.0 version and the following error is reported

image

So I tried to switch to another node version v16.11.1. As a result, the ts file was successfully executed and the result was printed

image

@TrySound
Copy link

14.5 is very old version which could have problems with esm support. The latest lts is 14.18.1
https://nodejs.org/en/

@lukeed
Copy link
Owner

lukeed commented Oct 16, 2021

Right, 14.10 or 14.14 (forget which) is the first version that actually shipped with the finalized ESM resolver. That's the final design and is what it supported by LTS, hence 16.x working as expected. Adding caveats for dead/outdated resolver versions isn't helpful and is something the ESM effort will have to be okay with since early versions of 13 & 14 had slightly different import/"exports" behavior -- and most of 12.x had nothing at all.

Recommend upgrading to a more recent version of Node 14

@lukeed lukeed closed this as completed Oct 16, 2021
@kukudeshiyi
Copy link
Author

Ok i see, thanks for the explanation

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

No branches or pull requests

3 participants