nodejs / nodejs/node

can't execute /dev/stdin on linux

Open
#54,200 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

confirmed-bug linux
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

Version

v22.5.1

Platform
Linux archlinux 6.10.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 27 Jul 2024 16:49:55 +0000 x86_64 GNU/Linux
Subsystem

No response

What steps will reproduce the bug?
printf 'console.log(1)' | node /dev/stdin
How often does it reproduce? Is there a required condition?

every time

What is the expected behavior? Why is that the expected behavior?
1
What do you see instead?
node:fs:453
    return binding.readFileUtf8(path, stringToFlags(options.flag));
                   ^

Error: ENOENT: no such file or directory, open '/proc/2513530/fd/pipe:[611889]'
Additional information

related so problem https://stackoverflow.com/q/77488707/13040423

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing printf 'console.log(1)' | node /dev/stdin on Linux and inspect the reported node:fs error for /proc/.../fd/pipe:[...]. Done means the command executes successfully and prints 1, matching the expected behavior described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, linux, node.js
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.