Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Failed to install with npm on ubuntu.

オープン
#7,140 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
nodejs
領域
build-system

調査の方向性

docs/npm.md とログに記載された postinstall.sh エントリーポイントから始めます。Node 20.18.1 と npm 10.8.2 を使用する Ubuntu 22.04 で npm install --loglevel verbose --global code-server を再現し、その後、postinstall ステップがコード 1 で終了する理由を特定します。ドキュメントに記載された npm のインストールが正常に完了すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug triage
Is there an existing issue for this?
  • I have searched the existing issues
OS/Web Information
  • Web Browser: NA
  • Local OS: Ubuntu 22.04
  • Remote OS: NA
  • Remote Architecture: NA
  • code-server --version: 4.96.2
Steps to Reproduce
  1. install dependency
  2. run npm install --loglevel verbose --global code-server
Expected

Successful installation.

Actual

Failed installation.

Logs
npm info run argon2@0.31.2 install node_modules/code-server/node_modules/argon2 node-pre-gyp install --fallback-to-build
npm info run argon2@0.31.2 install { code: 0, signal: null }
npm info run code-server@4.96.2 postinstall node_modules/code-server sh ./postinstall.sh
npm info run code-server@4.96.2 postinstall { code: 1, signal: null }
npm verbose stack Error: command failed
npm verbose stack     at promiseSpawn (/mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:22:22)
npm verbose stack     at spawnWithShell (/mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:124:10)
npm verbose stack     at promiseSpawn (/mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:12:12)
npm verbose stack     at runScriptPkg (/mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js:77:13)
npm verbose stack     at runScript (/mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js:9:12)
npm verbose stack     at /mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:329:17
npm verbose stack     at run (/mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/lib/node_modules/npm/node_modules/promise-call-limit/dist/commonjs/index.js:67:22)
npm verbose stack     at /mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/lib/node_modules/npm/node_modules/promise-call-limit/dist/commonjs/index.js:84:9
npm verbose stack     at new Promise (<anonymous>)
npm verbose stack     at callLimit (/mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/lib/node_modules/npm/node_modules/promise-call-limit/dist/commonjs/index.js:35:69)
npm verbose pkgid code-server@4.96.2
npm error code 1
npm error path /mnt/data_2/pingyu/nodejs/node_global/lib/node_modules/code-server
npm error command failed
npm error command sh -c sh ./postinstall.sh
npm error Installing Code dependencies...
npm error User agent: npm/10.8.2 node/v20.18.1 linux x64 workspaces/false
npm error You may not have the required dependencies to build the native modules.
npm error Please see https://github.com/coder/code-server/blob/main/docs/npm.md
npm error npm verbose cli /mnt/data_2/pingyu/tools/node-v20.18.1-linux-x64/bin/node /data_2/pingyu/tools/node-v20.18.1-linux-x64/bin/npm
npm error npm info using npm@10.8.2
npm error npm info using node@v20.18.1
npm error npm verbose title npm install
npm error npm verbose argv "install" "--unsafe-perm" "--omit" "dev"
npm error npm verbose logfile logs-max:10 dir:/data_2/pingyu/nodejs/node_cache/_logs/2024-12-25T15_32_13_644Z-
npm error npm verbose logfile /data_2/pingyu/nodejs/node_cache/_logs/2024-12-25T15_32_13_644Z-debug-0.log
npm error npm http fetch GET 200 https://registry.npmjs.org/@microsoft%2f1ds-core-js 3487ms (cache miss)
npm error npm http fetch GET 200 https://registry.npmjs.org/@microsoft%2f1ds-post-js 2391ms (cache miss)
Screenshot/Video

No response

Does this bug reproduce in native VS Code?

This cannot be tested in native VS Code

Does this bug reproduce in GitHub Codespaces?

This cannot be tested in GitHub Codespaces

Are you accessing code-server over a secure context?
  • I am using a secure context.
Notes

nodejs version: 20.18.1
npm version: 10.8.2

when run npm config set python python3, it outputs npm error python is not a valid npm option.

主要言語
TypeScript
スター
79.4k
フォーク
6.9k
平均マージ
2日 13時間
マージ済み PR(30日)
39

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/code-server のほかの issue

coder/code-server の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。