build(workflows): skip stale msvs_version npm config on Node.js v18/v20#13411
Draft
Planeshifter wants to merge 1 commit into
Draft
build(workflows): skip stale msvs_version npm config on Node.js v18/v20#13411Planeshifter wants to merge 1 commit into
msvs_version npm config on Node.js v18/v20#13411Planeshifter wants to merge 1 commit into
Conversation
…/v20 The job `test_npm_install` (Node.js v18 and v20 legs) on workflow `windows_test_npm_install` failed on every scheduled `develop` run for the past month with `npm error \`msvs_version\` is not a valid npm option`. Root cause: the `Configure npm` step unconditionally runs `npm config set msvs_version 2019`, but those two legs install npm v10+ (`NPM_VERSION: '>10.0.0'`), which validates config keys against a fixed schema and rejects the legacy `node-gyp` hint key that older npm releases accepted without validation. This commit adds an `if:` condition so the step is skipped for Node.js v18/v20, where the key is both unsupported and unnecessary (`node-gyp` bundled with npm v10+ auto-detects the installed Visual Studio toolset via `vswhere`). Ref: https://github.com/stdlib-js/stdlib/actions/runs/29010806701
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
windows_test_npm_installworkflow, which has failed on every scheduleddeveloprun for the past month. Thetest_npm_installjob fails at the "Configure npm" step on the Node.js v18 and v20 matrix legs withnpm error \msvs_version` is not a valid npm option. Skips thenpm config set msvs_version 2019` command for those two legs, where it is both invalid and unnecessary.Related Issues
This pull request has no related issues.
Questions
No.
Other
Failing run: https://github.com/stdlib-js/stdlib/actions/runs/29010806701
Symptom:
test_npm_installjob fails at the "Configure npm" step, exit code 1:Confirmed via job history on every scheduled
developrun going back to 2026-06-11.Root cause:
.github/workflows/windows_test_npm_install.yml's "Configure npm" step unconditionally runsnpm config set msvs_version 2019across the full build matrix. The v18 and v20 legs installNPM_VERSION: '>10.0.0'. npm v10+ validatesnpm config setkeys against a fixed internal schema and rejects the legacynode-gyphint keymsvs_version. The other legs run npm <10, which does not validate the key, so they pass.Fix: Added
if: matrix.NODE_VERSION != '20' && matrix.NODE_VERSION != '18'to the "Configure npm" step, plus a comment explaining why.node-gypbundled with npm v10+ auto-detects the installed Visual Studio toolset viavswhere(the runner already installsvisualstudio2019buildtoolsin the preceding step), somsvs_versionis redundant for those two legs, not required. One file changed, 12 insertions, 0 deletions.Validation: YAML syntax validated with
python3 -c "import yaml; yaml.safe_load(...)". Three independent review passes (correctness, regression scope, style/conventions) — all returned approve, no blocking findings.Reviewer notes (non-blocking):
if:condition is keyed onmatrix.NODE_VERSIONrather than the actual triggering variable (npm major version). If a future change bumps another leg (e.g. Node 16) to npm ≥10, this step fails again for that leg. Gating on npm version directly, or wrapping the command with a non-fatal fallback, would be more robust. Out of scope here.NPM_VERSION: '>10.0.0'constraint.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code as part of an automated CI-failure triage and fix routine, based on live GitHub Actions job log analysis. The fix was reviewed by three independent automated review passes before being proposed here.
@stdlib-js/reviewers
Generated by Claude Code