[BUG] Crash in `npm install`
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, nodejs
- 領域
- build-system, cli
調査の方向性
The crash occurs in the npm CLI when network fetch fails in an offline, containerized Guix environment. Start by examining the error handling in lib/npm.js and the exit handler. Look at the stack trace pointing to make-fetch-happen and pacote modules. Reproduce the issue in a minimal Guix container to understand the exact conditions triggering the crash. The goal is to ensure a useful error message is shown instead of a crash.
索引モデルが issue の本文から書いたものです。
説明
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 [email protected]
npm info using [email protected]
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:
[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
+ [email protected] [email protected]
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 [email protected]
npm info using [email protected]
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 [...]:
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.
- 主要言語
- JavaScript
- スター
- 10.3k
- フォーク
- 5k
- 平均マージ
- 4日 11時間
- マージ済み PR(30日)
- 26
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
npm/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
[BUG] scripts/dependency-graph.js splits npm-cli-repos.txt on os.EOL, so DEPENDENCIES.md depends on the checkout's line endings対応中かも @saruk-vedant が 7 日前に担当しました。 オープンBug Needs Triage Triage Requested
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
[BUG] npm pkg delete removes the first array item for a nonexistent property対応中かも @drawliin が 42 日前に担当しました。 オープンcmd:delete Priority 3
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 2 日以内に返信
-
create node pr: Node.js 20 deprecation & `DEP0040` warnings logged再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンEngineering Priority 1
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
メンテナーはふだん 2 日以内に返信
-
`npm audit signatures` does not report how many packages it skipped for want of registry keys対応中かも @greenlincoln05 が 63 日前に担当しました。 オープンPriority 3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
githubnext/gh-aw-workshop#6332 ·
メンテナーはふだん 1 日以内に返信
-
App Designer bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
avniproject/avni-webapp#1858 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 96/100
hiero-ledger/hiero-sdk-js#4834 ·
メンテナーはふだん 1 日以内に返信
-
[组件名称] 描述问题的标题オープン🐞 bug 🧐 unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Tencent/tdesign-miniprogram#4744 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Y-axis tooltip hides near the bottom of the plot while the y crosshair stays visible対応中かも @lazerg が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apexcharts/apexcharts.js#5449 ·
メンテナーはふだん 3 日以内に返信