The issue involves Windows path handling in Node.js v22, which may require deep understanding of file system APIs.
The issue occurs when using GitHub Actions to rebuild a package on Windows with Node.js v22, resulting in an EISDIR error. The problem appears to be related to path handling, potentially involving DOS device paths. The scope is somewhat clear but requires understanding of Windows file system APIs and Node.js internals.
v22.21.1
windows
No response
Use codeaction to trigger prebuild.yml of my project. For node v18 and v20, it's all good.
Every time I ran prebuild for v22 and above.
Prebuild successfully.
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!!
No response
Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!