-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
ts-node failing on "import" statements where tsconfig states "commonjs" module #505
Comments
I'm in the same situation, but my command isn't even as complex as yours:
|
There's something wrong with your tsconfig.json, probably. Check carefully. |
Using of |
|
Ended up with funny script that just copies my *.ts files out from |
@kirillgroshkov because this is |
@blakeembrey Does it work if I use |
@gluons I don't think you understood this issue and I'm not sure how you ended up here. You would never want to compile a native node.js module as TypeScript, but you can always import with valid types (e.g. |
@blakeembrey Oh! I solved my problem. Sorry for dumb question. I try to create an new fresh project to test Thank you very much for clarification. I really appreciate. |
@ blakeembrey "ts-node doesn't compile dependencies in node_modules. " Perhaps something like this could appear in an error message? |
You are welcome to create a PR, but what error message are you describing? |
I read through the now closed issue 212 and I think this is related but separate. In a nutshell what I'm trying to do is:
ts-node
npm build
script DOES compile to es2015 modules but thetsconf.json
explicitly states the module type as commonjs (aka, the build script just overrides the default setting for module)ts-node
would treat an external es2015 module the same as a local files using es2015 but maybe there's a difference?firemodel
which depends onabstracted-admin
. I'm the author of both and have tried switching over to es2015 to be more "rollup friendly"My mocha command is:
where the
TS_NODE_COMPILER_OPTIONS
ENV variable is set to:Here's the full error I'm getting:
The text was updated successfully, but these errors were encountered: