You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
not possible to run project with ts-node and ts config files #437
[ ] support request or question => Please do not submit support request or questions here, see note at the top of this template.
What is the current behavior?
I want to use ts config files AND run my project using ts-node.
Current behaviour - everything fails. I believe that programmatically registered ts-node is conflicting with the one who is running the application.
@markstos
yes. I've participated this one, for example: #416
Actually I think that there should be no seamless typescript format support in node-config, as usually you need to know (have control on) how your typescript file converts into javascript and executes after.
But as long as it is present - I think the bug is actual.
Face the same issue. The root cause is double registration of ts-node.
ts-node maintainer has rejected to introduce re-registration fix into ts-node. Actually he said he's going to throw an error in the future version.
I see several options:
Remove ts-node registration from node-config and expect app code to do it
Add configuration option to allow to disable ts-node re-registration
Detect existing ts(x)-file handler and do not register ts-node in this case
Activity
markstos commentedon Oct 6, 2017
Have you reviewed the other issues that relate to TypeScript? https://github.com/lorenwest/node-config/search?q=TypeScript&type=Issues&utf8=%E2%9C%93
PavloPoliakov commentedon Oct 6, 2017
@markstos
yes. I've participated this one, for example:
#416
Actually I think that there should be no seamless typescript format support in
node-config, as usually you need to know (have control on) how yourtypescriptfile converts into javascript and executes after.But as long as it is present - I think the bug is actual.
electroma commentedon Jan 7, 2018
Face the same issue. The root cause is double registration of ts-node.
ts-node maintainer has rejected to introduce re-registration fix into ts-node. Actually he said he's going to throw an error in the future version.
I see several options:
I like option 3 the most.
Your thoughts?
Fixes node-config#437
lorenwest commentedon Jan 7, 2018
Can it be determined that
ts-nodehas already been registered? Seems like an easy fix to skip registration if you can make this determination.lorenwest commentedon Jan 7, 2018
Looks like you've answered that in #458 - approved and merged. Thanks for providing the fix.
Merge pull request #458 from electroma/437-reuse-existing-ts-handler
electroma commentedon Jan 7, 2018
Thank you @lorenwest !
Please let me know how much time will it take to publish new version to the central NPM repo.
lorenwest commentedon Jan 7, 2018
No reason it can't go out today.
lorenwest commentedon Jan 7, 2018
Published today in [email protected]
Fixes node-config#437 again
electroma commentedon Jan 8, 2018
@lorenwest Please merge a little fix of that fix. Sorry about that.
lorenwest commentedon Jan 8, 2018
I was going to ask for a test, but it seemed like a small fix. This time to get this in I'd like you to add a test.
electroma commentedon Jan 8, 2018
@lorenwest done!
Thank you for keeping the quality bar high!
lorenwest commentedon Jan 9, 2018
Will try to get this in today
Merge pull request #459 from electroma/437-reuse-existing-ts-handler
lorenwest commentedon Jan 13, 2018
Published to npm @1.29.2