Skip to content

node -p cuts off output when piped #61337

Description

@mohd-akram

Version

v24.12.0

Platform

macOS 26.2

Subsystem

No response

What steps will reproduce the bug?

  1. seq -s ' ' 50000 >file
  2. node -p 'require("fs").readFileSync("file", "utf-8")' | cat

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

Always

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

Prints numbers up to 50000

What do you see instead?

Prints numbers up to 12773

Additional information

For comparison, run cat file | cat, which works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions