Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prebuild --backend cmake-js fails on Windows x86_64 #324

Closed
kraenhansen opened this issue Apr 17, 2024 · 1 comment · Fixed by #325
Closed

prebuild --backend cmake-js fails on Windows x86_64 #324

kraenhansen opened this issue Apr 17, 2024 · 1 comment · Fixed by #325

Comments

@kraenhansen
Copy link
Contributor

kraenhansen commented Apr 17, 2024

Node.js v20.12.2 was released 7 days ago with a fix for CVE-2024-27980, which breaks the way prebuild invokes cmake-js.

$ npx prebuild --backend cmake-js
prebuild info begin Prebuild version 13.0.0
prebuild info build Preparing to prebuild prebuild-issue-324@0.1.0 for node 20.12.2 on win32-x64 using cmake-js
node:internal/child_process:421
    throw new ErrnoException(err, 'spawn');
    ^

Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:761:9)
    at C:\cygwin\home\Administrator\prebuild-issue-324\node_modules\prebuild\cmakebuild.js:28:16
    at C:\cygwin\home\Administrator\prebuild-issue-324\node_modules\npm-which\index.js:35:9
    at C:\cygwin\home\Administrator\prebuild-issue-324\node_modules\npm-which\node_modules\which\which.js:87:20
    at C:\cygwin\home\Administrator\prebuild-issue-324\node_modules\isexe\index.js:42:5
    at C:\cygwin\home\Administrator\prebuild-issue-324\node_modules\isexe\windows.js:36:5
    at FSReqCallback.oncomplete (node:fs:205:5) {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'spawn'
}

Node.js v20.12.2

Reproduction

  • Get access to a x86_64 Windows box.
  • Install Node.js v20.12.2
  • Install prebuild and cmake-js npm install prebuild@13.0.0 cmake-js
  • Run prebuild --backend cmake-js
@lovell
Copy link
Member

lovell commented May 16, 2024

v13.0.1 now available, thank you for the PR @kraenhansen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants