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
If you have your ts file with import { once } from 'stream'
you'll tsc it and it becomes basically require('stream').once which works.
the latter resolves to a function both in node and bun.
Anyway, trying to run the ts file with bun, you get Export named 'once' not found in module 'node:stream' as reported in #19464, where it was decided to change the source to import from events. But, again, once exists in stream when you require.
I'm not sure if this should count as a compatibility problem for bun, since the transpiled js works (node and bun), but the ts doesn't, forcing me to transpile to get it working.
In a way, the compatibility problem is not with "node" but with "tsc+node", which may still be part of the goals of bun.
Should I create an issue or not?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If you have your ts file with
import { once } from 'stream'
you'll
tsc
it and it becomes basicallyrequire('stream').once
which works.the latter resolves to a function both in node and bun.
Anyway, trying to run the ts file with bun, you get
Export named 'once' not found in module 'node:stream'
as reported in #19464, where it was decided to change the source to import fromevents
. But, again,once
exists instream
when yourequire
.I'm not sure if this should count as a compatibility problem for bun, since the transpiled js works (node and bun), but the ts doesn't, forcing me to transpile to get it working.
In a way, the compatibility problem is not with "node" but with "tsc+node", which may still be part of the goals of bun.
Should I create an issue or not?
my ts config is
Beta Was this translation helpful? Give feedback.
All reactions