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
$ node --version
v20.6.1
$ node main.mjs
node:timers/promises:166
new AbortError(undefined, { cause: signal.reason })));
^
AbortError: The operation was aborted
at EventTarget.onCancel (node:timers/promises:166:15)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:807:20)
at EventTarget.dispatchEvent (node:internal/event_target:742:26)
at abortSignal (node:internal/abort_controller:369:10)
at AbortController.abort (node:internal/abort_controller:391:5)
at Timeout._onTimeout (file:///tmp/test/main.mjs:6:14)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7) {
code: 'ABORT_ERR',
[cause]: DOMException [AbortError]: This operation was aborted
at new DOMException (node:internal/per_context/domexception:53:5)
at AbortController.abort (node:internal/abort_controller:390:18)
at Timeout._onTimeout (file:///tmp/test/main.mjs:6:14)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
}
Node.js v20.6.1
Running with bun, we see no output.
What is the expected behavior?
Program exits with an uncaught exception
What do you see instead?
NodeJS successfully throws an AbortError, Bun does not
Additional information
The text was updated successfully, but these errors were encountered:
I was getting this error but it is a side effect from something else. Run it in node and it should tell you what the actual problem is. Once I corrected the error reported from running in node then it started working ok in bun.
I was getting this error but it is a side effect from something else. Run it in node and it should tell you what the actual problem is. Once I corrected the error reported from running in node then it started working ok in bun.
You can see in the original message that I am running it with node, and there is a clear difference. NodeJS ends with an uncaught exception, Bun does not. Bun claims to be compatible with NodeJS, so this is clearly breaking behaviour.
What version of Bun is running?
1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983
What platform is your computer?
Linux 6.5.2-arch1-1 x86_64 unknown
What steps can reproduce the bug?
Test code:
Running with node:
Running with bun, we see no output.
What is the expected behavior?
Program exits with an uncaught exception
What do you see instead?
NodeJS successfully throws an AbortError, Bun does not
Additional information
The text was updated successfully, but these errors were encountered: