Repository navigation
Regression in fs.readFile #55609
Copy link
Copy link
Closed
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.regressionIssues related to regressions.Issues related to regressions.
Description
Activity
- addedfsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.
on Oct 30, 2024 The call happens only once for the first call and the callbacks are not called instead an error is thrown like for sync function
AFAICT this is not the case. While I'm able to reproduce the issue, no call appears to use the callback, and an error is thrown.
This is because
getValidatedPathdoes not return the error to the callback, but instead throws it.- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.regressionIssues related to regressions.Issues related to regressions.
on Oct 30, 2024 @redyetidev In our case, we often call this function with
/, the second call does not even throw an error, sotry/catchdoesn't help in this caseI'll bisect.
Same in macos
The regression seems to be introduced by #54160
The regression is reverted, I'm closing this issue.
Reacted by Nitin Kumar@juanarbol When will be the patch released?
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.regressionIssues related to regressions.Issues related to regressions.
Version
v23.1.0
Platform
Subsystem
No response
What steps will reproduce the bug?
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 witherrandcodeshould beEISDIRWhat 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