Skip to content

.pipeTo(Writable.toWeb(process.stdout)) returns a never-settling Promise #56139

Open
@mikaelkaron

Description

@mikaelkaron

Version

  • v22.9.0
  • v22.12.0
  • v23.3.0

Platform

Linux a54ff73afbfe 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 GNU/Linux
Linux SURFACE9PRO 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

node:stream

What steps will reproduce the bug?

create file test.mjs

import { Readable, Writable } from 'node:stream'

await Readable.toWeb(process.stdin).pipeTo(Writable.toWeb(process.stdout))

run

echo test | node test.mjs 
test
Warning: Detected unsettled top-level await at file:///workspace/test.mjs:2
await Readable.toWeb(process.stdin).pipeTo(Writable.toWeb(process.stdout))
^

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

no warning, await to work as expected

What do you see instead?

warning about unsettled top-level await is shown

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions