nodejs / nodejs/node

When I use github codeaction to rebuild my package, `Error: EISDIR: illegal operation on a directory, lstat 'D:'` occurs

Đang mở
#61,165 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

stale windows
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.21.1

Platform
windows
Subsystem

No response

What steps will reproduce the bug?

Use codeaction to trigger prebuild.yml of my project.
For node v18 and v20, it's all good.

How often does it reproduce? Is there a required condition?

Every time I ran prebuild for v22 and above.

What is the expected behavior? Why is that the expected behavior?

Prebuild successfully.

What do you see instead?

The log:

=== DEBUG: Execution Attempt ===
Attempting to execute: node node_modules\tree-sitter-cli\cli.js generate
Working directory for execution: D:\a\tree-sitter-arkts\tree-sitter-arkts
--- Trying Method 1: npx tree-sitter generate ---
node:fs:2744
    const out = binding.lstat(base, false, undefined, true /* throwIfNoEntry */);
                        ^
Error: EISDIR: illegal operation on a directory, lstat 'D:'
    at Object.realpathSync (node:fs:2744:25)
    at toRealPath (node:internal/modules/helpers:61:13)
    at Function._findPath (node:internal/modules/cjs/loader:733:24)
    at Function._resolveFilename (node:internal/modules/cjs/loader:1369:27)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)
    at Function._load (node:internal/modules/cjs/loader:1192:37)
    at TracingChannel.traceSync (node:diagnostics_channel:328:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Module.require (node:internal/modules/cjs/loader:1463:12) {
  errno: -4068,
  code: 'EISDIR',
  syscall: 'lstat',
  path: 'D:'
}
Node.js v22.21.1
Node process exited with status 1

I search for many methods trying to fix this issue but none of them takes effect. Please give me some advice of how to fix this bug. Thank you so much!!

Additional information

No response

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện prebuild của Windows GitHub Actions với Node.js v22, so sánh với v18 và v20. Bắt đầu từ các điểm vào của stack trace trong node:fs realpathSync, internal/modules/helpers.js toRealPath và CommonJS loader, sau đó xác định lý do ổ đĩa D: được truyền cho lstat; hoàn thành khi prebuild hoàn tất thành công trên v22 và các phiên bản sau đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github-actions, javascript, node.js
Lĩnh vực
backend, operating-systems
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 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
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.