tree-sitter / parser-test-action

Test action for tree-sitter parsers
MIT License
2 stars 2 forks source link

Error: spawn EINVAL on windows #2

Closed glehmann closed 5 months ago

glehmann commented 6 months ago

This error appear in my pipeline a few days ago, without obvious changes that may have caused that on my side:

> node-gyp-build

node:internal/child_process:421
    throw new ErrnoException(err, 'spawn');
    ^

Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at Object.spawn (node:child_process:761:9)
    at build (D:\a\tree-sitter-earthfile\tree-sitter-earthfile\node_modules\node-gyp-build\bin.js:30:8)
    at preinstall (D:\a\tree-sitter-earthfile\tree-sitter-earthfile\node_modules\node-gyp-build\bin.js:39:32)
    at D:\a\tree-sitter-earthfile\tree-sitter-earthfile\node_modules\node-gyp-build\bin.js:11:7
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'spawn'
}

maybe something changed in one of the dependency?

https://github.com/glehmann/tree-sitter-earthfile/actions/runs/8709326071/job/23888716969#step:4:178

ObserverOfTime commented 6 months ago

See https://github.com/prebuild/prebuildify/issues/83 & https://github.com/prebuild/node-gyp-build/issues/68. It should work if you set node-version: 20.12.1.

glehmann commented 6 months ago

ok, going back to 21.7.1 worked for me 👍 . I had other problems with 20.12.1 on all the platforms

ObserverOfTime commented 5 months ago

Resolved upstream, just run npm update (or have dependabot update them).