Replies: 2 comments
-
the issue is your moduleTypes, values can only be |
Beta Was this translation helpful? Give feedback.
0 replies
-
Since Node update 20.0.0 you have to use a workaround. Just use In your package.json you can run your app like so:
Hope this helps. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been trying for the last couple of days to get functions and classes from other .ts files to be used in other files, but nothing seems to work, and if i change the "type" property in package.json to "module", the ts-node command doesn't work at all:
I have tried numerous solutions but nothing worked, not even
ts-node-esm ./index.ts
,ts-node --esm ./index.ts
, both cases in which i got 2 different errors depending on the ide:This is the filesystem:
package.json
tsconfig.json
interpreter/types.ts
index.ts
(PS There seems to be a really big problem in both typescript and ts-node with imports/exports of any type, not just es modules but commonjs and
/// <reference path="./interpreter/types.ts" />
)Beta Was this translation helpful? Give feedback.
All reactions