approvals / approvals/Approvals.NodeJS

[Windows] Install broken since node v20.12.2

Open
#176 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
125
Forks
46
Avg merge
2m
Merged PRs (30d)
16

Description

Node v20.12.2 under Windows added a change to spawn https://nodejs.org/en/blog/release/v20.12.2

This has broken https://github.com/approvals/Approvals.NodeJS/blob/master/install_dependencies.js

Error:

npm ERR! code 1
npm ERR! path H:\opt\compiler-explorer\cemain\node_modules\approvals
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install_dependencies.js
npm ERR!
npm ERR! node:internal/child_process:421
npm ERR!     throw new ErrnoException(err, 'spawn');
npm ERR!     ^
npm ERR!
npm ERR! Error: spawn EINVAL
npm ERR!     at ChildProcess.spawn (node:internal/child_process:421:11)
npm ERR!     at spawn (node:child_process:761:9)
npm ERR!     at Object.<anonymous> (H:\opt\compiler-explorer\cemain\node_modules\approvals\install_dependencies.js:7:13)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1369:14)
npm ERR!     at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:1206:32)
npm ERR!     at Module._load (node:internal/modules/cjs/loader:1022:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
npm ERR!     at node:internal/main/run_main_module:28:49 {
npm ERR!   errno: -4071,
npm ERR!   code: 'EINVAL',
npm ERR!   syscall: 'spawn'
npm ERR! }
npm ERR!
npm ERR! Node.js v20.12.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading install_dependencies.js and reproducing the npm install failure under Windows with Node v20.12.2, using the reported spawn EINVAL stack trace as the starting point. Done means the package installation completes successfully on that Node and Windows combination.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
operating-systems, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.