Repository navigation
fs.fstat(0) fails on Windows #40006
Copy link
Copy link
Closed
Labels
fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
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.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
on Sep 5, 2021 It can be easily reproduced with the following script:
require('fs').fstatSync(0)
- changed the title
[-]test-fs-stat fails on Windows[/-][+]fs.fstat(0) fails on Windows[/+]on Sep 5, 2021 @nodejs/platform-windows This is still an issue on my machine.
Reacted by Darien Maillet Valentine- added 2 commits that reference this issue
on Aug 18, 2022 - added a commit that references this issue
on Nov 29, 2022 The fix for this landed in libuv libuv/libuv#3811. The next time libuv is updated Node will be fixed as well.
Reacted by Michaël ZassoAfter updating
libuvto 1.45.0 this is fixed. @targos can you please close the issue? Thanks.- added a commit that references this issue
on Jul 23, 2025 - added a commit that references this issue
on Dec 16, 2025
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Version
master,v16.8.0
Platform
Microsoft Windows NT 10.0.22000.0 x64 (latest Windows 11 beta)
Subsystem
fs
What steps will reproduce the bug?
Run
node test/parallel/test-fs-stat.jsHow often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
Test should pass
What do you see instead?
node test/parallel/test-fs-stat.js
node:assert:986
throw newErr;
^
Additional information
Fails here:
node/test/parallel/test-fs-stat.js
Line 50 in 80785f6