child_process.execFileSync fails with EISDIR: illegal operation on a directory, lstat 'C:' on Windows in Node.js 22.20.0
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 122k
- Forks
- 37.3k
- Merge moyen
- 4 j 2 h
- PR mergées (30 j)
- 283
Description
Version
v22.20.0
Platform
Microsoft Windows NT 10.0.26200.0 x64
Subsystem
No response
What steps will reproduce the bug?
Node.js 22.20.0 may have introduced a regression in module resolution where child_process.execFileSync() fails when executing binaries from certain Windows paths. The error occurs during internal module resolution and affects multiple path patterns.
Error: EISDIR: illegal operation on a directory, lstat 'C:'
at Object.realpathSync (node:fs:2744:25)
at toRealPath (node:internal/modules/helpers:61:13)
at Module._findPath (node:internal/modules/cjs/loader:746:22)
at resolveMainPath (node:internal/modules/run_main:39:23)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:163:20)
at node:internal/main/run_main_module:36:49
Affected Path Patterns:
- Very long paths (>260 characters) with \?\ prefix
How often does it reproduce? Is there a required condition?
Reproducible every time with long paths with \?\ prefix on Windows
What is the expected behavior? Why is that the expected behavior?
In node 20.19.0 tests with long paths with \?\ prefix were passing successfully
What do you see instead?
Error: EISDIR: illegal operation on a directory, lstat 'C:'
at Object.realpathSync (node:fs:2744:25)
at toRealPath (node:internal/modules/helpers:61:13)
at Module._findPath (node:internal/modules/cjs/loader:746:22)
at resolveMainPath (node:internal/modules/run_main:39:23)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:163:20)
at node:internal/main/run_main_module:36:49 {
errno: -4068,
code: 'EISDIR',
syscall: 'lstat',
path: 'C:'
}
Additional information
No response
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire child_process.execFileSync sous Windows 22.20.0 avec un long chemin \?, puis comparez le résultat avec Node 20.19.0. Suivez le chemin signalé à travers internal/modules/helpers, internal/modules/cjs/loader et internal/modules/run_main ; le travail est terminé lorsque le modèle de chemin concerné s’exécute correctement sans l’erreur EISDIR lstat.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, node.js
- Domaine
- backend, operating-systems
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100