GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: pass nodedir to node-gyp via npm_package_config env in node integration by reggi · Pull Request #9822 · npm/cli

Conversation

@reggi

@reggi reggi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What / Why

The node-integration workflow passed --nodedir as an npm CLI flag to npm install. In npm 12 unknown configs are no longer accepted, so this now fails with EUNKNOWNCONFIG:

npm error code EUNKNOWNCONFIG
npm error Unknown cli flag:
npm error   - --nodedir

(seen in the Release Integration citgm jobs, e.g. citgm - [email protected]).

nodedir is a node-gyp option, not an npm config — it only ever worked via npm's old "accept arbitrary config and re-export as npm_config_*" behavior, which node-gyp itself notes was deprecated in npm v11 (nodejs/node-gyp#3156).

Change

Export npm_package_config_node_gyp_nodedir instead of using the CLI flag. This is node-gyp's preferred prefix since npm v11: node-gyp reads it directly from the environment, and npm does not warn on it — unlike npm_config_nodedir, which currently warns and is slated to error in npm 13.

This also matches how upstream nodejs/citgm supplies nodedir (via env, not a CLI flag).

Applied to both the generated .github/workflows/node-integration.yml and its scripts/template-oss/node-integration-yml.hbs template; template-oss-apply --lint passes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@reggi
chore: pass nodedir to node-gyp via npm_package_config env in node in…
8a9afee
…tegration

The node integration workflow passed `--nodedir` as an npm CLI flag, which
now errors with EUNKNOWNCONFIG in npm 12 since unknown configs are no longer
accepted. `nodedir` is a node-gyp option, not an npm config.

Switch to exporting `npm_package_config_node_gyp_nodedir`, node-gyp's
preferred prefix since npm v11, which node-gyp reads directly and npm does
not warn on (unlike `npm_config_nodedir`, which is slated to error in npm 13).

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 6e300b82-303b-49ac-ae93-52d984743d5b
@reggi
reggi requested review from a team as code owners July 30, 2026 16:04
v-mragunandhan24
v-mragunandhan24 approved these changes Jul 30, 2026
View reviewed changes
martinrrm
martinrrm approved these changes Jul 30, 2026
View reviewed changes
@reggi
reggi merged commit 278df04 into latest Jul 30, 2026
26 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@reggi
reggi deleted the reggi/node-integration-nodedir branch July 30, 2026 16:41
@github-actions github-actions Bot mentioned this pull request Aug 3, 2026
chore: release 12.1.0 #9839
Merged
@reggi reggi added the backport:v11 label Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

⚠️ Backport to release/v11 failed.

This usually means the cherry-pick had conflicts. Please create a manual backport:

git fetch origin release/v11
git checkout -b backport/v11/9822 origin/release/v11
git cherry-pick -x 278df04d3f25d391af3213a243bb9f89e1d11899
# resolve any conflicts, then:
git push origin backport/v11/9822
Error details
Command failed: git push origin backport/v11/9822
To https://github.com/npm/cli
 ! [remote rejected]     backport/v11/9822 -> backport/v11/9822 (refusing to allow a GitHub App to create or update workflow `.github/workflows/node-integration.yml` without `workflows` permission)
error: failed to push some refs to 'https://github.com/npm/cli'

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@reggi reggi mentioned this pull request Aug 28, 2026
chore: pass nodedir to node-gyp via npm_package_config env in node integration #9932
Merged
reggi added a commit that referenced this pull request Aug 28, 2026
@reggi
chore: pass nodedir to node-gyp via npm_package_config env in node in…
afdc5bd
…tegration (#9932)

Backport of #9822 to `release/v11`.

Copilot-Session: 744c3e7c-c466-43a7-b610-d67335f8dce3
@npm-cli-bot npm-cli-bot mentioned this pull request Sep 22, 2026
deps: upgrade npm to 12.1.0 nodejs/node#66212
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@martinrrm martinrrm martinrrm approved these changes
+1 more reviewer
@v-mragunandhan24 v-mragunandhan24 v-mragunandhan24 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

backport:v11

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@reggi @martinrrm @v-mragunandhan24
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.