Repository navigation
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.pathIssues and PRs related to the path subsystem.Issues and PRs related to the path subsystem.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
Version
v25.1.0
Platform
Microsoft Windows NT 10.0.26200.0 x64
Subsystem
fs
What steps will reproduce the bug?
Running node using an extended path like so: node \\?\C:\absolute\path\to\file.js
How often does it reproduce? Is there a required condition?
Any absolute path prefixed by \\?\
What is the expected behavior? Why is that the expected behavior?
The script is executed; or if the script file does not exist an error stating the file could not be found.
What do you see instead?
node:fs:2710
const out = binding.lstat(base, false, undefined, true /* throwIfNoEntry */);
^
Error: EISDIR: illegal operation on a directory, lstat 'C:'
at Object.realpathSync (node:fs:2710:25)
at toRealPath (node:internal/modules/helpers:62:13)
at Module._findPath (node:internal/modules/cjs/loader:774:22)
at resolveMainPath (node:internal/modules/run_main:35:21)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:146:20)
at node:internal/main/run_main_module:33:47 {
errno: -4068,
code: 'EISDIR',
syscall: 'lstat',
path: 'C:'
}
Additional information
This may have been introduced by #55623
Microsoft provide documentation on the path prefixes and semantics here: https://learn.microsoft.com/en-gb/windows/win32/fileio/naming-a-file
Reacted by Viktor Savinov
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.pathIssues and PRs related to the path subsystem.Issues and PRs related to the path subsystem.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Activity
fs: handle extended Windows path prefix in realpathSync and realpath
fs: handle extended path on windows
johncrim commentedon Jun 9, 2026
Related:
#60435
#61165
Another PR which provides a simpler fix for those issues. Ideally this PR should handle the
toRealPath()exception too.fs: fix realpath of namespaced drive paths
fs: fix realpath of namespaced drive paths
fs: fix realpath of namespaced drive paths
fs: fix realpath of namespaced drive paths
fs: fix realpath of namespaced drive paths
fs: fix realpath of namespaced drive paths
🐛 fix(build-cli): canonicalize declaration packages with the native f…
fix(win): strip \\?\ namespace from resolved entries; run launcher su…
fix(desktop,studio): Windows — no console flash, Assistant starts wit…
fix(pos): rutas sin prefijo \\?\ para el servidor en Windows
fix(dynamic-workflow): resolve newest cli.js directly on Windows, avo…