Migration tutorial fails without python2
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- nodejs, python
- Domaine
- build-system
Piste de recherche
Start with package-lock.json and the node-microtime installation path shown in the npm install output; inspect why node-gyp@3.8.0 invokes Python 2 syntax. Reproduce the migration tutorial with Node.js 20 and Python 3.9, then verify that npm install completes without requiring Python 2.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
The system I'm using only has python 3.9.18 installed. Running 'npm install' fails as follows:
$ npm install
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated tar@3.2.3: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
> microtime@2.1.9 install
> prebuild-install || node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@20.11.0 | linux | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (node:child_process:422:12)
gyp ERR! stack at ChildProcess.emit (node:events:518:28)
gyp ERR! stack at maybeClose (node:internal/child_process:1105:16)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
gyp ERR! System Linux 5.14.0-362.8.1.el9_3.x86_64
gyp ERR! command "/usr/local/nodejs/node-v20.11/bin/node" ".../node-microtime/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd .../node-microtime
gyp ERR! node -v v20.11.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code 1
npm ERR! path .../node-microtime
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
The issue seems to be that node-gyp@3.8.0 ends up in package-lock.json, which issues the python print statement without parentheses.
Is there a way around this without installing python2? Thanks.
- Langage dominant
- C++
- Étoiles
- 2.6k
- Forks
- 602
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de nodejs/node-addon-examples
-
Create Valgrind run of tests Ouverteenhancement
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
nodejs/node-addon-examples#585 · 1 réaction ·
-
Add .d.ts files in samples. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 38/100
nodejs/node-addon-examples#530 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
nodejs/node-addon-examples#445 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 32/100
nodejs/node-addon-examples#444 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
nodejs/node-addon-examples#380 · 2 commentaires ·
Toutes les issues de nodejs/node-addon-examples
Issues similaires
-
Website Doc Typo Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
-
Difficulté 1/5 1-3 heures Accessibilité débutants 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
automated-analysis bug memory-safety
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100