Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Failed to install with npm on ubuntu.

Ouverte
#7,140 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
30/100
Type d'issue
Bug
Clarté
À clarifier
Activité
À l'abandon
Stack technique
nodejs
Domaine
build-system

Piste de recherche

Commencez par docs/npm.md et par le point d’entrée postinstall.sh indiqué dans le journal. Reproduisez npm install --loglevel verbose --global code-server sur Ubuntu 22.04 avec Node 20.18.1 et npm 10.8.2, puis déterminez pourquoi l’étape postinstall se termine avec le code 1. La tâche est terminée lorsque l’installation npm documentée s’achève avec succès.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
79.4k
Forks
6.9k
Merge moyen
2 j 13 h
PR mergées (30 j)
39

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de coder/code-server

Toutes les issues de coder/code-server

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.