Closed siLiang220 closed 1 month ago
Would you be able to provide a minimal reproduction? 🙏
You might need to upgrade to Node 14.18.0+
https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_node_imports
Thank you for your response. I have rolled back to using version 1.21.0 for now. Thank you for the suggestion regarding upgrading Node. I will consider upgrading to Node 14.18.0+ if necessary.
I have added a relavant refactor (https://github.com/unjs/jiti/commit/5d877de3fc24312c870c55f7a7445cb250ac9949) but checking dist (we have another check for it for #109), and also locally with latest Node.js 14.x, same as @danielroe i could not reproduce...
I would suggest to upgrade to a supported Node.js version like 20 if you can.
Environment
Node Version: 14.17.6
jiti Version: 1.21.3
Reproduction
Describe the bug
I upgraded jiti to version 1.21.3 in a Node 14.17.6 environment, but encountered the above error. From my understanding, this may be due to some changes in jiti version 1.21.3, possibly related to compatibility with Node versions.
Additional context
No response
Logs
No response