child_process.execFileSync fails with EISDIR: illegal operation on a directory, lstat 'C:' on Windows in Node.js 22.20.0
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 122k
- Fork
- 37.3k
- Merge trung bình
- 4 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 283
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện child_process.execFileSync trên Windows 22.20.0 với một đường dẫn dài \?, sau đó so sánh kết quả với Node 20.19.0. Theo dõi đường dẫn được báo cáo qua internal/modules/helpers, internal/modules/cjs/loader và internal/modules/run_main; được xem là hoàn tất khi mẫu đường dẫn bị ảnh hưởng thực thi thành công mà không có lỗi EISDIR lstat.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, node.js
- Lĩnh vực
- backend, operating-systems
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100