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
The script should run without errors. It should echo the input into the output.
What do you see instead?
$ npx bun main.ts
1 | import { Readable, Writable } from 'node:stream';
2 |
3 | Readable.toWeb(process.stdin).pipeTo(Writable.toWeb(process.stdout));
^
TypeError: lazyWebStreams().newWritableStreamFromStreamWritable is not a function. (In 'lazyWebStreams().newWritableStreamFromStreamWritable(streamWritable)', 'lazyWebStreams().newWritableStreamFromStreamWritable' is undefined)
at node:stream:2941:66
at C:\Users\Leonardo Raele\Workspace\testapp\src\main.ts:3:47
Bun v1.1.42 (Windows x64)
Additional information
The script works on Node:
$ node --import=tsx .\src\main.ts
Hello
Hello
Piping stdin to stdout without converting to web streams work as expected.
$ npx bun -e "process.stdin.pipe(process.stdout)"
Hello
Hello
The text was updated successfully, but these errors were encountered:
leonardoraele
changed the title
Converting process io streams to web streams crash the app
Converting node streams to web streams crash the app
Dec 31, 2024
leonardoraele
changed the title
Converting node streams to web streams crash the app
Converting node streams to web streams throws an error
Dec 31, 2024
What version of Bun is running?
1.1.42+50eec0025
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
Minimum reproducible script:
What is the expected behavior?
The script should run without errors. It should echo the input into the output.
What do you see instead?
Additional information
The script works on Node:
Piping
stdin
tostdout
without converting to web streams work as expected.$ npx bun -e "process.stdin.pipe(process.stdout)" Hello Hello
The text was updated successfully, but these errors were encountered: