Bonjour à tous et à toutes,
Voila je rencontre un petit problème.
Je veux installer node-opus afin que mon bot puisse jouer de la musique cependant j'ai ce message d'erreur quand je mets la commande suivante : npm i --save node-opus
J'obtient ce retour en console mais je ne sais pas comment l'interpréter :
> ref@1.3.4 install C:\Users\Victor\bot\node_modules\ref
> node-gyp rebuild
C:\Users\Victor\bot\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:112:15)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Victor\bot\node_modules\ref
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
> node-opus@0.2.6 install C:\Users\Victor\bot\node_modules\node-opus
> node-gyp rebuild
C:\Users\Victor\bot\node_modules\node-opus>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:112:15)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Victor\bot\node_modules\node-opus
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN discord.js@11.1.0 requires a peer of bufferutil@^3.0.0 but none was installed.
npm WARN discord.js@11.1.0 requires a peer of erlpack@hammerandchisel/erlpack but none was installed.
npm WARN discord.js@11.1.0 requires a peer of opusscript@^0.0.3 but none was installed.
npm WARN discord.js@11.1.0 requires a peer of sodium@^2.0.1 but none was installed.
npm WARN discord.js@11.1.0 requires a peer of libsodium-wrappers@^0.5.1 but none was installed.
npm WARN discord.js@11.1.0 requires a peer of uws@^0.14.1 but none was installed.
npm WARN bot@1.0.0 No description
npm WARN bot@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ref@1.3.4 (node_modules\ref):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ref@1.3.4 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "--save" "node-opus"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! node-opus@0.2.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-opus@0.2.6 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-opus package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-opus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-opus
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Victor\bot\npm-debug.log
Pouvez-vous m'aider à installer node-opus, je vous remercie d'avance.
Que dois-je faire ?
Je n'ai pas l'habitude d'utiliser node.js et le terminal.
Tu as installé node-gyp en global (npm i -g node-gyp
) ?
Si oui, fais un node-gyp build
, sinon installe-le et tape la commande ;)
Il est possible qu'il te manque des dépendances systèmes, tu es sur quel env ?
Merci pour ta réponse, je viens d'installer node-gyp cependant quand je veux le build, j'ai l'erreur suivante :
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@7.5.0 | win32 | x64
gyp ERR! build error
gyp ERR! stack Error: You must run `node-gyp configure` first!
gyp ERR! stack at ReadFileContext.<anonymous> (C:\Users\Victor\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:51:20)
gyp ERR! stack at ReadFileContext.callback (C:\Users\Victor\AppData\Roaming\npm\node_modules\node-gyp\node_modules\graceful-fs\graceful-fs.js:78:16)
gyp ERR! stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:336:13)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Victor\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd C:\Users\Victor\bot
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
puis je réalise la commande node-gyp configure , qui me génére :
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@7.5.0 | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Victor\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Victor\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\Victor\AppData\Roaming\npm\node_modules\node-gyp\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:112:15)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Victor\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\Victor\bot
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
Il ne trouve pas Python mais il est bien installé sur mon pc.
Je suis sur Windows 10.
Je ne sais pas ce que je dois faire maintenant.
J'ai effectivement changé le path qui est affiché dans la console, il indique qu'il ne trouve pas l'exécutable alors que son chemin (C:\Python36\python.EXE) est bien celui retourné dans la console
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@7.5.0 | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Python36\python.EXE", you
can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Victor\AppData\Roaming
\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Victor\AppData\Roaming\
npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\Victor\AppData\Roaming\npm\node_modules\node-gyp\
node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:112:15)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Victor\\AppDa
ta\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\Victor\bot
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
Je ne comprends pas
J'ai suivi votre tuto en désinstallant python et en suivant les manips, le chemin est donc différent mais j'ai toujours un code d'erreur :
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@7.5.0 | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Python36-64\python.EXE",
you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Victor\AppData\Roaming
\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Victor\AppData\Roaming\
npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\Victor\AppData\Roaming\npm\node_modules\node-gyp\
node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:112:15)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Victor\\AppDa
ta\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\Victor\bot
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
Je ne vois plus quoi faire
Mesdames et Messieurs bonjour ou bonsoir,
Je suis sincerement désolé de relancer le sujet mais j'ai aussi deux problème avec l'installation de discord.js :
J'essaie d'installer la librarie erlpack@hammerandchisel/erlpack
mais ça ne marche pas, ça m'affiche (console)
C:\Users\olivi\Documents\Discord_JS>npm install --save erlpack@hammerandchisel/erlpack
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\olivi\AppData\Roaming\npm-cache\_logs\2018-01-03T23_20_28_955Z-debug.log
Et dans le fichier "2018-01-03T23_20_28_955Z-debug.log"
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '--save',
1 verbose cli 'erlpack@hammerandchisel/erlpack' ]
2 info using npm@5.6.0
3 info using node@v8.9.4
4 verbose npm-session 45312a5b9717fc63
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for erlpack@github:hammerandchisel/erlpack No git binary found in $PATH
8 verbose stack Error: No git binary found in $PATH
8 verbose stack at checkGit (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\util\git.js:203:17)
8 verbose stack at spawnGit (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\util\git.js:182:10)
8 verbose stack at pinflight (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\util\git.js:114:12)
8 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\promise-inflight\inflight.js:29:24
8 verbose stack at Promise._execute (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\debuggability.js:303:9)
8 verbose stack at Promise._resolveFromExecutor (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:483:18)
8 verbose stack at new Promise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:79:10)
8 verbose stack at _inflight (C:\Program Files\nodejs\node_modules\npm\node_modules\promise-inflight\inflight.js:28:25)
8 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\promise-inflight\inflight.js:22:14
8 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
8 verbose stack at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
8 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
8 verbose stack at Promise._settlePromiseCtx (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:606:10)
8 verbose stack at Async._drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:138:12)
8 verbose stack at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
8 verbose stack at Immediate.Async.drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
9 verbose cwd C:\Users\olivi\Documents\Discord_JS
10 verbose Windows_NT 10.0.16299
11 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "erlpack@hammerandchisel/erlpack"
12 verbose node v8.9.4
13 verbose npm v5.6.0
14 error code ENOGIT
15 error No git binary found in $PATH
16 error Failed using git.
16 error Please check if you have git installed and in your PATH.
17 verbose exit [ 1, true ]
Question concernant ce problème :
Quelle est l'erreur (je ne suis pas très bon en anglais, je n'arrive donc pas à comprendre...) ?
Comment pallier à cette dernière ?
Sur ce même projet, node m'affiche la ligne suivante :
npm WARN ariajsgenius@1.0.0 No repository field.
Question sur ce problème :
Que veut dire node par cette ligne (encore une fois, mon niveau assez pitoyable d'angalis m'handicape) ?
Et comment pourrais-je résoudre cette erreur ?
Je vous remercie du fond du coeur d'avoir passé du temps à lire ce post, merci aussi si vous avez trouvé la ou les solutions,
Bien cordialement,
Ohw :)