discord-music-bot icon indicating copy to clipboard operation
discord-music-bot copied to clipboard

kinda error ish on the hosting but not on my pc

Open daniel04092004-prog opened this issue 3 years ago • 6 comments

s.node' Require stack:

  • /home/container/node_modules/@discordjs/opus/lib/index.js
  • /home/container/node_modules/prism-media/src/util/loader.js
  • /home/container/node_modules/prism-media/src/opus/Opus.js
  • /home/container/node_modules/prism-media/src/opus/index.js
  • /home/container/node_modules/prism-media/src/index.js
  • /home/container/node_modules/@discordjs/voice/dist/audio/TransformerGraph.js
  • /home/container/node_modules/@discordjs/voice/dist/audio/AudioResource.js
  • /home/container/node_modules/@discordjs/voice/dist/audio/index.js
  • /home/container/node_modules/@discordjs/voice/dist/index.js
  • /home/container/commands/music/leave.js
  • /home/container/index.js Error: Cannot find module 'node-opus' Require stack:
  • /home/container/node_modules/prism-media/src/util/loader.js
  • /home/container/node_modules/prism-media/src/opus/Opus.js
  • /home/container/node_modules/prism-media/src/opus/index.js
  • /home/container/node_modules/prism-media/src/index.js
  • /home/container/node_modules/@discordjs/voice/dist/audio/TransformerGraph.js
  • /home/container/node_modules/@discordjs/voice/dist/audio/AudioResource.js
  • /home/container/node_modules/@discordjs/voice/dist/audio/index.js
  • /home/container/node_modules/@discordjs/voice/dist/index.js
  • /home/container/commands/music/leave.js
  • /home/container/index.js Error: Cannot find module 'opusscript' Require stack:
  • /home/container/node_modules/prism-media/src/util/loader.js
  • /home/container/node_modules/prism-media/src/opus/Opus.js
  • /home/container/node_modules/prism-media/src/opus/index.js
  • /home/container/node_modules/prism-media/src/index.js
  • /home/container/node_modules/@discordjs/voice/dist/audio/TransformerGraph.js
  • /home/container/node_modules/@discordjs/voice/dist/audio/AudioResource.js
  • /home/container/node_modules/@discordjs/voice/dist/audio/index.js
  • /home/container/node_modules/@discordjs/voice/dist/index.js
  • /home/container/commands/music/leave.js
  • /home/container/index.js at Object.loader [as require] (/home/container/node_modules/prism-media/src/util/loader.js:12:9) at loadOpus (/home/container/node_modules/prism-media/src/opus/Opus.js:17:17) at new OpusStream (/home/container/node_modules/prism-media/src/opus/Opus.js:46:10) at new Encoder (/home/container/node_modules/prism-media/src/opus/Opus.js:149:5) at Object.transformer (/home/container/node_modules/@discordjs/voice/dist/audio/TransformerGraph.js:120:24) at /home/container/node_modules/@discordjs/voice/dist/audio/AudioResource.js:156:60 at Array.map () at createAudioResource (/home/container/node_modules/@discordjs/voice/dist/audio/AudioResource.js:156:41) at MusicPlayer.process (/home/container/utils/music/Player.js:159:24) at handleSubscription (/home/container/commands/music/play.js:670:10) at processTicksAndRejections (node:internal/process/task_queues:96:5)

daniel04092004-prog avatar Oct 06 '21 14:10 daniel04092004-prog

i have all required modules installed on the hosting Modules: discord.js mongoose mongodb @discordjs/builders @discordjs/opus @discordjs/rest @discordjs/voice @vitalets/google-translate-api cheerio discord-api-types discord.js-pages ffmpeg-static iso-639-1 libsodium-wrappers spotify-url-info youtube-dl-exec youtube-sr ytdl-core

daniel04092004-prog avatar Oct 06 '21 14:10 daniel04092004-prog

npm WARN While resolving: [email protected] npm WARN Found: @discordjs/[email protected] npm WARN node_modules/@discordjs/opus npm WARN @discordjs/opus@"^0.6.0" from the root project npm WARN npm WARN Could not resolve dependency: npm WARN peerOptional @discordjs/opus@"^0.5.0" from [email protected] npm WARN node_modules/prism-media npm WARN prism-media@"^1.3.1" from @discordjs/[email protected] npm WARN node_modules/@discordjs/voice npm WARN npm WARN Conflicting peer dependency: @discordjs/[email protected] npm WARN node_modules/@discordjs/opus npm WARN peerOptional @discordjs/opus@"^0.5.0" from [email protected] npm WARN node_modules/prism-media npm WARN prism-media@"^1.3.1" from @discordjs/[email protected] npm WARN node_modules/@discordjs/voice npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@sapphire/[email protected]', npm WARN EBADENGINE required: { node: '>=v14.18.0', npm: '>=7.24.1' }, npm WARN EBADENGINE current: { node: 'v16.10.0', npm: '7.24.0' } npm WARN EBADENGINE } npm ERR! code 1 npm ERR! path /home/container/node_modules/youtube-dl-exec npm ERR! command failed npm ERR! command sh -c npm run check && node scripts/postinstall.js npm ERR! > [email protected] check npm ERR! > bin-version-check python ">=2" npm ERR! Error: Couldn't find the python binary. Make sure it's installed and in your $PATH. npm ERR! at binaryVersion (file:///home/container/node_modules/bin-version/index.js:44:22) npm ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5) npm ERR! at async binaryVersionCheck (file:///home/container/node_modules/bin-version-check/index.js:14:18)

npm ERR! A complete log of this run can be found in: npm ERR! /home/container/.npm/_logs/2021-10-06T14_48_48_566Z-debug.log

changed 2 packages, and audited 1115 packages in 5s

daniel04092004-prog avatar Oct 06 '21 14:10 daniel04092004-prog

npm ERR! Error: Couldn't find the `python` binary. Make sure it's installed and in your $PATH.

elvanz avatar Oct 07 '21 02:10 elvanz

got the exact same thing when running/deploying w docker. can confirm this is reproducible

ll-O-ll avatar Oct 17 '21 14:10 ll-O-ll

got the exact same thing when running/deploying w docker. can confirm this is reproducible

+1 my railway deploy fails too

patheticGeek avatar Jan 05 '22 00:01 patheticGeek

Ok so the issue is missing build-essential package in your os This error occurs in the @discordjs/opus package Here's the link to issue: https://github.com/discordjs/opus/issues/116

For me on fedora 35 this was the command to run sudo dnf install make automake gcc gcc-c++ kernel-devel

Fixed this in my pr #80 (the last commit)

patheticGeek avatar Jan 05 '22 01:01 patheticGeek