Skip to content

ci: nightly native CITGM fixtures ignore configured Node headers #10065

Description

@reggi

Summary

The npm 12.2.0 release integration fails to install both leveldown@6.1.1 and microtime@3.1.1 on Node.js nightly. Their older node-gyp versions do not use the workflow's current Node source-directory configuration and try to install headers for the prerelease runtime.

Both failures share one root cause and should remain in one issue.

Affected run

Release: npm 12.2.0

Branch: latest

Commit: c276cadf785c1018d82dd287fe7742567055efb9

Workflow: https://github.com/npm/cli/actions/runs/36746332014

Failing jobs:

Failure

The workflow exports:

npm_package_config_node_gyp_nodedir="${{ steps.install.outputs.nodedir }}"

Both fixtures then invoke node-gyp-build. Their bundled node-gyp versions try to install headers for the prerelease Node version instead of using the already-built Node source directory.

leveldown uses node-gyp 8.4.1:

gyp info using node@27.0.0-pre | linux | x64
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead

microtime uses node-gyp 9.4.1 and fails with the same message.

Root-cause status

Confirmed: both failures occur during native configure because node-gyp attempts its header-install path for a prerelease Node version.

Confirmed: the workflow already has a built Node directory and attempts to expose it through npm_package_config_node_gyp_nodedir.

Unresolved: whether the affected node-gyp versions require npm_config_nodedir, a direct --nodedir argument, fixture metadata, or another compatibility path in this npm 12 integration environment.

Investigation and resolution

Verify how node-gyp 8.4.1 and 9.4.1 receive nodedir through npm lifecycle environments under npm 12. Use the minimum fixture-specific or workflow-level transport that makes the intended native build consume the existing Node source tree.

Confirm the fix with both fixtures because their node-gyp versions differ. Do not mark the issue fixed merely because installation reaches a later step.

Acceptance criteria

  • leveldown and microtime use the provided Node source directory on nightly.
  • Neither fixture attempts to download or install headers for v27.0.0-pre.
  • Both native builds complete and their package tests execute.
  • Stable Node integration behavior remains unchanged.
  • Any workflow change is also applied to its source template and assessed for release/v11.

Scope boundary

This is separate from #10023. thread-sleep fails because CITGM passes the rejected npm CLI option --build-from-source; leveldown and microtime reach their native installer and fail while locating Node headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions