Skip to content

Regression in fs.readFile  #55609

Description

@alexander-akait

Version

v23.1.0

Platform

Linux akait-notebook 6.8.0-47-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 21:40:26 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

const fs = require("fs");

fs.readFile("/", err => {
	console.log(err);
});

fs.readFile("/", err => {
	console.log(err);
});

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

Always

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

Like in Node.js@22, each callback should be run with err and code should be EISDIR

What do you see instead?

The call happens only once for the first call and the callbacks are not called instead an error is thrown like for sync function

Additional information

Ref: webpack/webpack#18891

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.fsIssues and PRs related to file-system APIs and the fs module.regressionIssues related to regressions.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions