Skip to content

citgm-smoker fails node-gyp in Linux #1202

Open

Description

@MikeMcC399

Situation

npm module node-gyp fails when run through Jenkins citgm-smoker on alpine-latest-x64, for example

https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/nodes=alpine-latest-x64/3797/testReport/junit/(root)/citgm/node_gyp_v13_1_0/

It does however succeed when run in an Alpine Linux Docker container.

Edit: This also affects testing in other Linux environments.

Item Status
npm package https://www.npmjs.com/package/node-gyp
npm status active
last published 13.1.0 Oct 2, 2026
weekly downloads 18,714,496
repo location https://github.com/nodejs/node-gyp
repo last update to default branch Oct 15, 2026
repo status active
repo CI status runs in Node.js 22 - 26
lookup - skip win32
lookup tests release / HEAD HEAD
lookup maintainer 1 nodejs/node-gyp

Steps to reproduce

Run in citgm-smoker

Comparison

When citgm node-gyp is run in a Node.js Docker Alpine Linux container using the prerequisites described in https://github.com/nodejs/node-gyp#on-unix, then the test is successful:

docker run -it --rm node:26.12.0-alpine3.24 sh
apk add --no-cache python3 make g++ gcc libgcc
npm install citgm -g # 10.0.4
citgm node-gyp

Logs

from citgm-smoker

 added 278 packages in 23s
 > node-gyp@13.1.0 test
 > cross-env NODE_GYP_NULL_LOGGER=true mocha --timeout 30000 test/test-download.js test/test-*
   download
      download over http (81ms)
      download over https with custom ca
      download over http with proxy (57ms)
      download over https with proxy and custom ca (62ms)
      download over http with noproxy
      download with missing cafile
      check certificate splitting
      download will retry on ECONNRESET (1517ms)
     - download headers (actual)
   addon
      build simple addon (6560ms)
     - build simple addon in path with non-ascii characters
      addon works with renamed host executable (4998ms)
   build symlink fallback
      continues and warns when symlink creation fails
      fails if symlink creation failed for unknown reason
   configure-nodedir
     1) configure nodedir with node-gyp command line
   configure-python
      configure PYTHONPATH with no existing env (82ms)
      configure PYTHONPATH with existing env of one dir (61ms)
      configure PYTHONPATH with existing env of multiple dirs (55ms)
   create-config-gypi
      config.gypi with no options
      config.gypi with --debug
      config.gypi with custom options
      config.gypi with nodedir
      config.gypi with --force-process-config
      config.gypi disables LTO for addon builds on Windows
      config.gypi parsing
   find-accessible-sync
      find accessible - empty array
      find accessible - single item array, readable
      find accessible - single item array, readable in subdir
      find accessible - single item array, unreadable
      find accessible - multi item array, no matches
      find accessible - multi item array, single match
      find accessible - multi item array, return first match
   find-node-directory
      test find-node-directory - node install
      test find-node-directory - node build
      test find-node-directory - node in bin directory
      test find-node-directory - node in build release dir
      test find-node-directory - node in Debug release dir
      test find-node-directory - not found
      test find-node-directory - node install
   find-python
      find python (89ms)
      find python - encoding (107ms)
      find python - python
      find python - python too old
      find python - no python
      find python - no python2, no python, unix
      find python - no python, use python launcher
      find python - no python, no python launcher, good guess
      find python - no python, no python launcher, bad guess
   find-visualstudio
      VS2013
      VS2013 should not be found on new node versions
      VS2015
      error from PowerShell
      empty output from PowerShell
      output from PowerShell not JSON
      wrong JSON from PowerShell
      empty JSON from PowerShell
      future version
      single unusable VS2017
      minimal VS2017 Build Tools
      VS2017 Community with C++ workload
      VS2017 Express
      VS2019 Preview with C++ workload
      minimal VS2019 Build Tools
      VS2019 Community with C++ workload
      VS2022 Preview with C++ workload
      VS2026 Preview with C++ workload
      VS2026 Release with C++ workload
      VS2022 Build Tools with ARM64 MSVC only
      VSSetup: VS2022 with C++ workload without SDK
      VSSetup: VS2019 with C++ workload
      VSSetup: VS2022 with C++ workload
      VSSetup: VS2022 and VS2019 with C++ workload
      VSSetup: VS2022 with multiple installations
      fail when looking for invalid path
      look for VS2013 by version number
      look for VS2013 by installation path
      look for VS2015 by version number
      look for VS2015 by installation path
      look for VS2017 by version number
      look for VS2017 by installation path
      look for VS2019 by version number
      look for VS2019 by installation path
      look for VS2022 by version number
      msvs_version match should be case insensitive
      latest version should be found by default
      run on a usable VS Command Prompt
      VCINSTALLDIR match should be case insensitive
      run on a unusable VS Command Prompt
      run on a VS Command Prompt with matching msvs_version
      run on a VS Command Prompt with mismatched msvs_version
      run on a portable VS Command Prompt with sufficient environs
   install
      EACCES retry once
     parallel
       - Skipping parallel installs test due to test environment configuration
       - Skipping parallel installs test due to test environment configuration
       - Skipping parallel installs test due to test environment configuration
   options
      options in environment
      options with spaces in environment
      options with msvs_version
      --msvs_version on the command line, as the README documents it
      --msvs_version with a separate value
      --msvs-version on the command line
      --loglevel on the command line wins over npm_config_loglevel
   process-release
      test process release - process.version = 0.8.20
      test process release - process.version = 0.10.21
      test process release - process.version = 0.12.9
      test process release - process.version = 0.10.41
      test process release - process.release ~ node@0.10.42
      test process release - process.release ~ node@0.12.10
      test process release - process.release ~ node@4.1.23
      test process release - process.release ~ node@4.1.23 / corp build
      test process release - process.release ~ node@12.8.0 Windows
      test process release - process.release ~ node@12.8.0 Windows ARM64
      test process release - process.release ~ node@4.1.23 --target=0.10.40
      test process release - process.release ~ node@4.1.23 --dist-url=https://foo.bar/baz
      test process release - process.release ~ frankenstein@4.1.23
      test process release - process.release ~ frankenstein@4.1.23 --dist-url=http://foo.bar/baz/
      test process release - process.release ~ node@4.0.0-rc.4
      test process release - process.release ~ node@4.0.0-rc.4 passed as argv[0]
      test process release - process.release ~ node@4.0.0-rc.4 - bogus string passed as argv[0]
      test process release - NODEJS_ORG_MIRROR
   windows-cross-compile
     - build simple node-api addon
   114 passing (44s)
   6 pending
   1 failing
   1) configure-nodedir
        configure nodedir with node-gyp command line:
      Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/iojs/tmp/citgm_tmp/ae98eb5d/node-gyp/test/test-configure-nodedir.js)
       at listOnTimeout (node:internal/timers:685:17)
       at process.processTimers (node:internal/timers:618:7)
 /home/iojs/tmp/citgm_tmp/ae98eb5d/node-gyp/test/fixtures/test-charmap.py:11: DeprecationWarning: 'locale.getdefaultlocale' is deprecated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead.
   encoding = locale.getdefaultlocale()[1]

References

citgm/lib/lookup.json

Lines 294 to 300 in 37e1545

"node-gyp": {
"envVar": { "FAST_TEST": "true" },
"tags": "native",
"maintainers": ["nodejs/node-gyp"],
"skip": ["win32"],
"head": true
},

cc: @nodejs/node-gyp

Activity

  1. gengjiawen commented on Oct 19, 2026

    @gengjiawen
    Member

    Thanks for the report! This is a test-isolation bug in node-gyp's own test suite, not an Alpine problem. It only shows up in citgm-smoker because that job sets nodedir.

    The Jenkins citgm-smoker job runs export npm_config_nodedir="$WORKSPACE/node" and calls citgm --nodedir=$npm_config_nodedir (citgm-smoker.xml), and citgm then puts npm_config_nodedir into the module's test environment (create-options.js#L22-L25). node-gyp lets npm_config_* override command line options, so the test's --nodedir=/usr is replaced and the spawn stub's assert.fail() throws. The test passes assert.fail as a third argument to the async configure(), where it is ignored, so the rejection is swallowed and mocha only reports the 30s timeout.

    Your Docker run passes because plain citgm node-gyp doesn't set nodedir. npm_config_nodedir=/anything npx mocha test/test-configure-nodedir.js reproduces the timeout locally on any OS.

    Fix: nodejs/node-gyp#3389. Because the lookup uses "head": true, node-gyp in citgm-smoker should go green as soon as it lands, with no release needed.

    Side note: according to that job config, every non-Windows smoker node exports npm_config_nodedir, so I'd expect the same single failure on the other Linux/macOS nodes too, not just alpine-latest-x64. I can't see ci.nodejs.org without logging in, so I couldn't confirm that.

  2. MikeMcC399 commented on Oct 19, 2026

    @MikeMcC399
    ContributorAuthor

    @gengjiawen

    Side note: according to that job config, every non-Windows smoker node exports npm_config_nodedir, so I'd expect the same single failure on the other Linux/macOS nodes too, not just alpine-latest-x64. I can't see ci.nodejs.org without logging in, so I couldn't confirm that.

    I was using older logs to avoid re-running the Jenkins smoker. You're right that other Linux is also shown as failing in these older Jenkins logs. I thought that had been fixed though as I had separately tested in GitHub Actions. Due to running from HEAD, the date of the run is important, rather than the version of node-gyp.

    Thanks in any case for picking up this issue!

  3. changed the title [-]`citgm-smoker` fails `node-gyp` in `alpine-latest-x64`[/-] [+]`citgm-smoker` fails `node-gyp` in Linux[/+] on Oct 19, 2026
  4. MikeMcC399 commented on Oct 19, 2026

    @MikeMcC399
    ContributorAuthor

    I changed the title and the description to make it more generally applied to Linux.

    It causes a failure in Jenkins, although the same tests are successful running in GitHub Actions, locally in bare-metal or using a Docker image.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions