discordjs / opus

Native opus bindings for node
MIT License
197 stars 57 forks source link

My bot refuses to run AAAGHHHH #99

Closed StupidRepo closed 3 years ago

StupidRepo commented 3 years ago

Alright, I am very angry at this.

I went to install pm2 npm i pm2 and it gave me an error saying it needed prism-media all of a sudden when starting my bot

BUT I CAN'T INSTALL PRISM-MEDIA BECAUSE IT GIVES ME AN ERROR ABOUT DISCORDJS/OPUS NOT BEING ABLE TO COMPILE BECAUSE OF THAT trying not to swear here HEADER FILE.

My bots no longer run. I cannot fix it.

StupidRepo commented 3 years ago

Here is the whole error log I don't care if it has my name in it:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: nodium-chloride@1.0.0
npm ERR! Found: discord.js@13.1.0
npm ERR! node_modules/discord.js
npm ERR!   discord.js@"^13.1.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer discord.js@"12" from distube@2.8.18
npm ERR! node_modules/distube
npm ERR!   distube@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/bradleebarnes/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bradleebarnes/.npm/_logs/2021-08-19T13_29_42_668Z-debug.log
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm install @distube/beta
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@distube%2fbeta - Not found
npm ERR! 404 
npm ERR! 404  '@distube/beta@*' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bradleebarnes/.npm/_logs/2021-08-19T13_33_07_420Z-debug.log
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm install @distube/bet 
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@distube%2fbet - Not found
npm ERR! 404 
npm ERR! 404  '@distube/bet@*' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bradleebarnes/.npm/_logs/2021-08-19T13_33_12_639Z-debug.log
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm install distube@beta

added 55 packages, and audited 346 packages in 14s

33 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm install @discordjs/voice

up to date, audited 346 packages in 2s

33 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm install sodium          
npm ERR! code 1
npm ERR! path /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/sodium
npm ERR! command failed
npm ERR! command sh -c node install.js --preinstall
npm ERR! Static libsodium was not found at /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
npm ERR! automake is required, but wasn't found on this system
npm ERR! make: *** [libsodium] Error 1
npm ERR! /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/sodium/install.js:293
npm ERR!             throw new Error(cmdLine + ' exited with code ' + code);
npm ERR!             ^
npm ERR! 
npm ERR! Error: make libsodium exited with code 2
npm ERR!     at ChildProcess.<anonymous> (/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/sodium/install.js:293:19)
npm ERR!     at ChildProcess.emit (node:events:394:28)
npm ERR!     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bradleebarnes/.npm/_logs/2021-08-19T13_36_25_786Z-debug.log
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm i libsodium-wrappers

added 2 packages, and audited 348 packages in 4s

33 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm update

added 30 packages, removed 30 packages, changed 23 packages, and audited 348 packages in 10s

33 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm i @distube/soundcloud @distube/spotify

added 24 packages, removed 14 packages, changed 10 packages, and audited 376 packages in 7s

41 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm i
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 har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated discord-api-types@0.18.1: No longer supported. Install the latest release (0.20.2)

added 375 packages, and audited 376 packages in 25s

41 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm i libsodium-wrappers

up to date, audited 376 packages in 3s

41 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm i prism-media
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: prism-media@1.3.2
npm ERR! Found: @discordjs/opus@0.6.0
npm ERR! node_modules/@discordjs/opus
npm ERR!   peer @discordjs/opus@"*" from distube@3.0.0-beta.36
npm ERR!   node_modules/distube
npm ERR!     peer distube@"^3.0.0-beta.34" from @distube/soundcloud@0.2.2
npm ERR!     node_modules/@distube/soundcloud
npm ERR!       @distube/soundcloud@"^0.2.2" from the root project
npm ERR!     peer distube@"^3.0.0-beta.35" from @distube/spotify@0.6.2
npm ERR!     node_modules/@distube/spotify
npm ERR!       dev @distube/spotify@"^0.6.2" from the root project
npm ERR!     1 more (the root project)
npm ERR!   @discordjs/opus@"^0.6.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @discordjs/opus@"^0.5.0" from prism-media@1.3.2
npm ERR! node_modules/prism-media
npm ERR!   prism-media@"*" from the root project
npm ERR!   prism-media@"^1.3.1" from @discordjs/voice@0.6.0
npm ERR!   node_modules/@discordjs/voice
npm ERR!     peer @discordjs/voice@">=0.5.6" from distube@3.0.0-beta.36
npm ERR!     node_modules/distube
npm ERR!       peer distube@"^3.0.0-beta.34" from @distube/soundcloud@0.2.2
npm ERR!       node_modules/@distube/soundcloud
npm ERR!       2 more (@distube/spotify, the root project)
npm ERR!     1 more (the root project)
npm ERR! 
npm ERR! Conflicting peer dependency: @discordjs/opus@0.5.3
npm ERR! node_modules/@discordjs/opus
npm ERR!   peerOptional @discordjs/opus@"^0.5.0" from prism-media@1.3.2
npm ERR!   node_modules/prism-media
npm ERR!     prism-media@"*" from the root project
npm ERR!     prism-media@"^1.3.1" from @discordjs/voice@0.6.0
npm ERR!     node_modules/@discordjs/voice
npm ERR!       peer @discordjs/voice@">=0.5.6" from distube@3.0.0-beta.36
npm ERR!       node_modules/distube
npm ERR!         peer distube@"^3.0.0-beta.34" from @distube/soundcloud@0.2.2
npm ERR!         node_modules/@distube/soundcloud
npm ERR!         2 more (@distube/spotify, the root project)
npm ERR!       1 more (the root project)
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/bradleebarnes/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bradleebarnes/.npm/_logs/2021-08-20T11_04_06_728Z-debug.log
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm remove @discordjs/opus

up to date, audited 376 packages in 2s

41 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
bradleebarnes@Bradlees-MBP Nodium-Chloride % npm i prism-media         
npm ERR! code 1
npm ERR! path /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_projection_encoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/analysis.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/mlp_data.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_encoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_projection_decoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/mapping_matrix.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_compare.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/mlp.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_decoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_decoder.o
npm ERR! Failed to execute '/opt/homebrew/Cellar/node/16.6.2/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node --module_name=opus --module_path=/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.4.1
npm ERR! node-pre-gyp info using node@16.6.2 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.5.3/opus-v0.5.3-node-v93-napi-v3-darwin-arm64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.5.3/opus-v0.5.3-node-v93-napi-v3-darwin-arm64-unknown-unknown.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/opus@0.5.3 and node@16.6.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.5.3/opus-v0.5.3-node-v93-napi-v3-darwin-arm64-unknown-unknown.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.6.2 | darwin | arm64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.6.2 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
npm ERR! (node:86053) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/bradleebarnes/Library/Caches/node-gyp/16.6.2/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/bradleebarnes/Library/Caches/node-gyp/16.6.2',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/bradleebarnes/Library/Caches/node-gyp/16.6.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.6.2 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../deps/opus/src/opus_decoder.c:50:
npm ERR! In file included from ../deps/opus/silk/structs.h:32:
npm ERR! In file included from ../deps/opus/silk/SigProc_FIX.h:51:
npm ERR! ../deps/opus/silk/arm/biquad_alt_arm.h:31:11: fatal error: 'celt/arm/armcpu.h' file not found
npm ERR! # include "celt/arm/armcpu.h"
npm ERR!           ^~~~~~~~~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/libopus/deps/opus/src/opus_decoder.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.4.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/16.6.2/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node" "--module_name=opus" "--module_path=/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus
npm ERR! gyp ERR! node -v v16.6.2
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/opt/homebrew/Cellar/node/16.6.2/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node --module_name=opus --module_path=/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Darwin 20.4.0
npm ERR! node-pre-gyp ERR! command "/opt/homebrew/Cellar/node/16.6.2/bin/node" "/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/@discordjs/opus
npm ERR! node-pre-gyp ERR! node -v v16.6.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.1
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bradleebarnes/.npm/_logs/2021-08-20T11_04_35_382Z-debug.log
KinectTheUnknown commented 3 years ago

peer discord.js@"12" from distube@2.8.18

distube doesn't support d.js v13

StupidRepo commented 3 years ago

ohh I forgot to install the beta of distube

StupidRepo commented 3 years ago

nope:

Error: Cannot find module 'prism-media'
Require stack:
- /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/core/DisTubeStream.js
- /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/core/index.js
- /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/struct/Queue.js
- /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/struct/index.js
- /Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/index.js
- /Users/bradleebarnes/Desktop/Nodium-Chloride/bot.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.<anonymous> (/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/core/DisTubeStream.js:5:23)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/core/DisTubeStream.js',
    '/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/core/index.js',
    '/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/struct/Queue.js',
    '/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/struct/index.js',
    '/Users/bradleebarnes/Desktop/Nodium-Chloride/node_modules/distube/dist/index.js',
    '/Users/bradleebarnes/Desktop/Nodium-Chloride/bot.js'
  ]
}
[nodemon] app crashed - waiting for file changes before starting...
StupidRepo commented 3 years ago

It was working fine a minute ago before I typed npm i pm2 wtffff

DTrombett commented 3 years ago

Well, the error clearly says that the distube package requires djs v12, while you're using v13. You should remove that package.

About compilation errors, I don't know, maybe it's a problem with your python version? Or, did you try to delete your node_modules directory and lock file?

StupidRepo commented 3 years ago

No, distube@beta supports djs v13

StupidRepo commented 3 years ago

I've just installed the distube@beta issue still happens

casperiv0 commented 3 years ago

The beta does support djs v13, ig it wasn't updated in the package.json yet. You should be able to install it still using npm i distube@beta --legacy-peer-deps if you're on npm 7

StupidRepo commented 3 years ago

oh ok

almostSouji commented 3 years ago

This is neither the place for distube support nor a chat interface, please only use this repository for bugs regarding the discord.js opus library.

StupidRepo commented 3 years ago

.

StupidRepo commented 3 years ago

fine. I will literally give up on my bot I don't give a care in the world anymore