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

[bug] hangs forever #128

Closed
loynoir opened this issue Jan 31, 2023 · 5 comments · Fixed by #141 or #143
Closed

[bug] hangs forever #128

loynoir opened this issue Jan 31, 2023 · 5 comments · Fixed by #141 or #143

Comments

@loynoir
Copy link

loynoir commented Jan 31, 2023

prepare

$ npm remove ts-node
$ npm exec tsc
$ ls worker.ts worker.js
worker.ts worker.js
$ grep worker runner.ts
const fn = createSyncFn(require.resolve("./worker.js"))

actual

$ node runner.js
(hangs forever)
^C

expected

$ npm i ts-node
$ node runner.js
OK
$ npm remove ts-node
$ mv worker.ts worker.ts.bak
$ node runner.js
OK

seems like

Wrong extension priority, calling ts without tsrunner leads to syntax error.

Having no reply, so hangs forever.

@JounQin
Copy link
Member

JounQin commented Jan 31, 2023

.ts is preferred over .js, this is intended.

@loynoir
Copy link
Author

loynoir commented Jan 31, 2023

Hangs forever is intended, seems weird.

@loynoir
Copy link
Author

loynoir commented Jan 31, 2023

I suggest, if no tsrunner option, don't search for ts, so it won't hangs forever, silently.

@JounQin JounQin pinned this issue Jul 31, 2023
@JounQin
Copy link
Member

JounQin commented Nov 18, 2023

After thinking, I'll raise a fix for this. Thanks for reporting.

@JounQin
Copy link
Member

JounQin commented Dec 1, 2023

After #141, .ts will still be preferred, but if there is no ts-node installed it will throw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants