Skip to content

[BUG] Crash in npm install #10030

Open
Open

Description

@apteryks

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

This is not just a request to bump a dependency for a CVE

  • This is not solely a request to bump a dependency for a CVE

Current Behavior

Using Guix to to build taler-util, npm install crashes like the following:

[...]
npm verbose cli /gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/bin/node /gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/bin/npm-cli.js
npm info using npm@11.19.1
npm info using node@v26.10.0
npm verbose title npm install
npm verbose argv "--loglevel" "verbose" "--offline" "--fetch-retries" "0" "--ignore-scripts" "--install-links" "--no-audit" "--prefix" "/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util" "install"
npm verbose logfile logs-max:10 dir:/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npm/_logs/2026-09-24T05_24_04_331Z-
npm verbose logfile /tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npm/_logs/2026-09-24T05_24_04_331Z-debug-0.log
npm http fetch GET https://registry.npmjs.org/npm attempt 1 failed with EAI_AGAIN
npm verbose cwd /tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util
npm verbose os Linux 7.1.8
npm verbose node v26.10.0
npm verbose npm  v11.19.1
npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error   <https://github.com/npm/cli/issues>
npm verbose exit 1
npm verbose code 1
npm error A complete log of this run can be found in: /tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npm/_logs/2026-09-24T05_24_04_331Z-debug-0.log
error: in phase 'configure': uncaught exception:
%exception #<&invoke-error program: "/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/bin/npm" arguments: ("--verbose" "--offline" "--fetch-retries=0" "--ignore-scripts" "--install-links" "--no-audit" "--prefix=/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util" "install") exit-status: 1 term-signal: #f stop-signal: #f> 

phase `configure' failed after 2.5 seconds
command "/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/bin/npm" "--verbose" "--offline" "--fetch-retries=0" "--ignore-scripts" "--install-links" "--no-audit" "--prefix=/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util" "install" failed with status 1

Despite the package.json dependencies being patched to be absolute file names, which npm appears to be satisfied with, npm tries to reach to the network, fails (this happens in a containerized, isolated environment) and crashes without a useful error.

Expected Behavior

A useful error should be produced instead of a crash asking me to file a bug.

Steps To Reproduce

I'm using these components:

node@26.10.0 node-big-integer@1.6.52 node-esbuild@0.28.2 node-fflate@0.8.3 node-follow-redirects@1.16.0 node-hash-wasm@4.12.0 node-jed@1.1.1 node-tslib@2.8.1 node-types-follow-redirects@22.14.0
+ node-types-node@22.14.0 node-typescript@6.0.3

I was not able to reproduce outside of the minimal Guix build container; at least it should be easy to reproduce with GNU Guix, which can run on top of any GNU/Linux distribution (to install, see: https://guix.gnu.org/manual/devel/en/guix.html#Binary-Installation-1, and use the guix-install.sh script).

guix time-machine -q --url=https://codeberg.org/guixotic/guix -commit=npm-crash-issue-10030-repro -- build -K taler-util

It should leave the failed build directory under /tmp/guix-build-taler-util-1.6.5.drv-0, which you can enter and try the same thing, this time outside the container.

cd /tmp/guix-build-taler-util-1.6.5.drv-0
. environment-variables 
cd source/packages/taler-util
npm "--verbose" "--offline" "--fetch-retries=0" "--ignore-scripts" "--install-links" "--no-audit" "--prefix=/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util" "install"
npm verbose cli /gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/bin/node /gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/bin/npm-cli.js
npm info using npm@11.19.1
npm info using node@v26.10.0
npm verbose title npm install
npm verbose argv "--loglevel" "verbose" "--offline" "--fetch-retries" "0" "--ignore-scripts" "--install-links" "--no-audit" "--prefix" "/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util" "install"
npm verbose logfile logs-max:10 dir:/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npm/_logs/2026-09-24T08_47_32_149Z-
npm verbose logfile /tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npm/_logs/2026-09-24T08_47_32_149Z-debug-0.log
npm verbose stack Error: request to https://registry.npmjs.org/typescript failed: cache mode is 'only-if-cached' but no cached response is available.
npm verbose stack     at cacheFetch (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js:12:13)
npm verbose stack     at async fetch (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:98:7)
npm verbose stack     at async RegistryFetcher.packument (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/pacote/lib/registry.js:90:19)
npm verbose stack     at async RegistryFetcher.manifest (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/pacote/lib/registry.js:128:23)
npm verbose stack     at async RegistryFetcher.resolve (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/pacote/lib/registry.js:55:5)
npm verbose stack     at async #extractOrLink (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:775:7)
npm verbose stack     at async /gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:699:7
npm verbose stack     at async Promise.allSettled (index 0)
npm verbose stack     at async #reifyPackages (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:353:11)
npm verbose stack     at async Arborist.reify (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:139:7)
npm error code ENOTCACHED
npm error request to https://registry.npmjs.org/typescript failed: cache mode is 'only-if-cached' but no cached response is available.
npm verbose cwd /tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util
npm verbose os Linux 7.1.8
npm verbose node v26.10.0
npm verbose npm  v11.19.1
npm verbose exit 1
npm verbose code 1
npm error A complete log of this run can be found in: /tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npm/_logs/2026-09-24T08_47_32_149Z-debug-0.log

As you can see, it doesn't crash in this environment, so it looks like the minimal Guix build environment is key to trigger the crash.

I tried reproducing in a similar container via:

$ guix time-machine -q --url=https://codeberg.org/guixotic/guix -commit=npm-crash-issue-10030-repro -- shell --writable-root -CD taler-util

Which will leave you in a container, but it also won't reproduce.

Attached is the Guix build log;

node-26.10.0-crash-building-taler-util.log.txt

The npm log:

2026-09-24T06_00_55_521Z-debug-0.log

A strace of npm execution, strace -s800 -f [...]:

taler-util.strace.txt

Environment

  • npm: 11.19.1
  • Node.js: 26.10.0
  • OS Name: Guix System
  • System Model Name: x86_64
  • npm config:
$ npm config ls
; node bin location = /gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/bin/node
; node version = v26.10.0
; npm local prefix = /tmp/guix-build-taler-util-1.6.5.drv-0/source
; npm version = 11.19.1
; cwd = /tmp/guix-build-taler-util-1.6.5.drv-0/source
; HOME = /tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0
; Run `npm config ls -l` to show all defaults.

Activity

  1. apteryks commented on Sep 24, 2026

    @apteryks
    Author

    When retrying the failed build outside of the build container, the npm log contains the following:

    0 verbose cli /gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/bin/node /gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/bin/npm-cli.js
    1 info using npm@11.19.1
    2 info using node@v26.10.0
    3 silly config load:file:/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/npmrc
    4 silly config load:file:/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/.npmrc
    5 silly config load:file:/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npmrc
    6 silly config load:file:/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/etc/npmrc
    7 verbose title npm install
    8 verbose argv "--loglevel" "verbose" "--offline" "--fetch-retries" "0" "--ignore-scripts" "--install-links" "--no-audit" "--prefix" "/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util" "install"
    9 verbose logfile logs-max:10 dir:/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npm/_logs/2026-09-24T08_18_27_765Z-
    10 verbose logfile /tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npm/_logs/2026-09-24T08_18_27_765Z-debug-0.log
    11 silly logfile done cleaning log files
    12 silly packumentCache heap:4395630592 maxSize:1098907648 maxEntrySize:549453824
    13 silly idealTree buildDeps
    14 silly reify mark retired [
    14 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/esbuild',
    14 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.bin/esbuild'
    14 silly reify ]
    15 silly reify mark retired [
    15 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/typescript',
    15 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.bin/tsc',
    15 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.bin/tsserver'
    15 silly reify ]
    16 silly reify moves {
    16 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/esbuild': '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.esbuild-7OiNVnw9',
    16 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.bin/esbuild': '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.bin/.esbuild-qYrBw0Us',
    16 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/typescript': '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.typescript-lOEwVZ6w',
    16 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.bin/tsc': '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.bin/.tsc-M0CiG5Rn',
    16 silly reify   '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.bin/tsserver': '/tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/taler-util/node_modules/.bin/.tsserver-1cJlc24u'
    16 silly reify }
    17 silly packumentCache corgi:https://registry.npmjs.org/typescript cache-miss
    18 silly packumentCache corgi:https://registry.npmjs.org/esbuild cache-miss
    19 verbose stack Error: request to https://registry.npmjs.org/typescript failed: cache mode is 'only-if-cached' but no cached response is available.
    19 verbose stack     at cacheFetch (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js:12:13)
    19 verbose stack     at async fetch (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:98:7)
    19 verbose stack     at async RegistryFetcher.packument (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/pacote/lib/registry.js:90:19)
    19 verbose stack     at async RegistryFetcher.manifest (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/pacote/lib/registry.js:128:23)
    19 verbose stack     at async RegistryFetcher.resolve (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/pacote/lib/registry.js:55:5)
    19 verbose stack     at async #extractOrLink (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:775:7)
    19 verbose stack     at async /gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:699:7
    19 verbose stack     at async Promise.allSettled (index 0)
    19 verbose stack     at async #reifyPackages (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:353:11)
    19 verbose stack     at async Arborist.reify (/gnu/store/m8k90i2k51xbmbprf3s9vga0g1p39rwq-node-26.10.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:139:7)
    20 error code ENOTCACHED
    21 error request to https://registry.npmjs.org/typescript failed: cache mode is 'only-if-cached' but no cached response is available.
    22 silly unfinished npm timer reify 1790237907852
    23 silly unfinished npm timer reify:unpack 1790237907870
    24 silly unfinished npm timer reifyNode:node_modules/typescript 1790237907870
    25 silly unfinished npm timer reifyNode:node_modules/esbuild 1790237907870
    26 verbose cwd /tmp/guix-build-taler-util-1.6.5.drv-0/source
    27 verbose os Linux 7.1.8
    28 verbose node v26.10.0
    29 verbose npm  v11.19.1
    30 verbose exit 1
    31 verbose code 1
    32 error A complete log of this run can be found in: /tmp/guix-build-taler-util-1.6.5.drv-0/source/packages/npm-home-0/.npm/_logs/2026-09-24T08_18_27_765Z-debug-0.log
    
  2. apteryks commented on Sep 30, 2026

    @apteryks
    Author

    I found another report which may be related (I'm not sure) #8364

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

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions