Coder Social home page Coder Social logo

opus's People

Contributors

androz2091 avatar armand1m avatar dependabot[bot] avatar electroluxv2 avatar femshima avatar fyko avatar icrawl avatar jacoblincool avatar jiralite avatar kirdock avatar kyranet avatar my60gb avatar n1ckoates avatar osiris-plus avatar raiomarco avatar vladfrangu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opus's Issues

Error: FATAL ERROR: Error::ThrowAsJavaScriptException napi_throw #5081

Please describe the problem you are having in as much detail as possible:
I get error when trying to play music, it looks like its the problem with discord.js opus

Further details:

  • @discordjs/opus version: 12.5.1
  • Node.js version: >12, not sure which one because am using hosting!
  • Operating system: Linux
  • Priority this issue should have – please be realistic and elaborate if possible: It's not that required right now, but would be great if got fast response
FATAL ERROR: Error::ThrowAsJavaScriptException napi_throw
1: 0xa17c40 node::Abort() [/usr/local/bin/node]
2: 0xa1804c node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
3: 0xa180e9 [/usr/local/bin/node]
4: 0x9ebbfb napi_fatal_error [/usr/local/bin/node]
5: 0x7f62802e74b6 [/home/container/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.28/opus.node]
6: 0x7f62802e79eb Napi::Error::ThrowAsJavaScriptException() const [/home/container/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.28/opus.node]
7: 0x7f62802f20d8 OpusEncoder::Decode(Napi::CallbackInfo const&) [/home/container/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.28/opus.node]
8: 0x7f62802e9f47 Napi::InstanceWrap<OpusEncoder>::InstanceMethodCallbackWrapper(napi_env__*, napi_callback_info__*) [/home/container/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.28/opus.node]
9: 0x9cfc55 [/usr/local/bin/node]
10: 0xc019e9 [/usr/local/bin/node]
11: 0xc037d7 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]
12: 0x1409319 [/usr/local/bin/node]
/entrypoint.sh: line 12: 3013 Aborted (core dumped) /usr/local/bin/node /home/container/${BOT_JS_FILE} 

Can't install discord opus on Ubuntu

Please describe the problem you are having in as much detail as possible:
I cant install discordjs opus, I have python, gcc, make and node gyp
Include a reproducible code sample here, if possible:
Running this line on a project whose djs opus as dependency:
npm i -D

sardonyx@keyubu:~/bot$ npm i -D
npm ERR! code 127
npm ERR! path /home/sardonyx/bot/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! sh: 1: node-pre-gyp: not found

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/sardonyx/.npm/_logs/2020-11-09T13_20_22_488Z-debug.log

Error Log: https://hastebin.com/kuyevayata.apache

Further details:

  • @discordjs/opus version: 0.3.3
  • Node.js version: v15.1.0
  • Operating system: Ubuntu 18.04
  • Priority this issue should have – please be realistic and elaborate if possible: Low

Cannot install the package on Debian 9

root@closure:/home/myname/myfolder# npm i @discordjs/[email protected]

> @discordjs/[email protected] install /home/myname/myfolder/node_modules/@discordjs/opus
> patch-package && node-pre-gyp install --fallback-to-build

sh: 1: patch-package: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! @discordjs/[email protected] install: `patch-package && node-pre-gyp install --fallback-to-build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @discordjs/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-10-22T09_45_10_936Z-debug.log
  • @discordjs/opus version: 0.3.2 (happens on any version though it seems)
  • Node.js version: v12.19.0
  • Operating system: Debian 9.13
    Works fine on Windows 10 and Debian 10 though. I tried to install the dependencies myself, nothing has changed.

No Audio Output on Windows Server

Please describe the problem you are having in as much detail as possible:
Using OS: Windows Server 2012 R2, I'm trying to stream a .mp3 streamlink via DiscordJS over my Bot. I am not getting any audio output. I've tested my code on 2 other Windows machines and it worked. I installed VS Community 2019 on my Server with the Desktop Development with C++ Workload.
Include a reproducible code sample here, if possible:
const dispatcher = connection.play(${streamLink})

**Further details:**

- @discordjs/opus version: @discordjs/opus@0.3.2
- Node.js version: 12.18.2
- Operating system: Windows Server 2012 R2

Example of ogg encoding

Is your feature request related to a problem? Please describe.
I'm using this library to encode Opus buffers like so:

      const opusEncoder = new OpusEncoder(48000, chunk.numberOfChannels)
      const opusBuffer = opusEncoder.encode(Buffer.from(pcmBuffer))

I want to encapsulate this with ogg in order to send it to the google speech-to-text api (see OGG_OPUS)

I'm finding this process really painful and so far have been unsuccessful, if there are any known examples of what is required I would be incredibly grateful.

Here's what I'm trying atm:
Using node-ogg

const oggEncoder = ogg.Encoder();
const oggStream = oggEncoder.stream();

const audioInputStreamTransform = new Writable({
  write(frame, encoding, next) {
    if (frame) {
        oggStream.write(frame);
      }
    }
    next();
  },
});

voiceStream.pipe(audioInputStreamTransform)
oggEncoder.pipe(google-speech2textStream)

// Neither of these work - nothing appears to be happening
// No data events emitted from either stream
// oggEncoderStream.pipe(google-speech2textStream)

Describe the ideal solution
I appreciate this isn't strictly a problem with this library but given that ogg is the recommended encapsulation I think it would be beneficial to show an example of how to achieve this.

Describe alternatives you've considered
I've also tried to use the ogg-packet library to wrap my buffer in the ogg_packet struct before sending off to oggStream.write. This also leads to no data events being emitted. I'm pretty sure this is the wrong approach given ogg-packet says:

You'll most likely not need to use this module for any practical purposes

but I thought I would try anyway.

What I've tried

          const packet = new ogg_packet();
          packet.packet = frame;
          packet.bytes = frame.length;

          // this will be the first packet in the ogg stream
          packet.b_o_s = 1;
          // there will be more `ogg_packet`s after this one in the ogg stream
          packet.e_o_s = 0;

          // the "packetno" should increment by one for each packet in the ogg stream
          packet.packetno = packetno++;

          // No joy with any of these
          //oggStream.write(ogg.ogg_packet(packet));
          //oggStream.write(packet);
          //oggStream.write(packet.buffer);

Additional context
I'm a real novice when it comes to audio encoding so I'm probably misunderstanding some part of this process - apologies if it's something trivial but I've been doing this for about a week now 😅

If there's a better place to ask for help please feel free to move me along - thanks :)

Also tried something like this example from node-opus with no luck

error install

I am trying to install the package on my linux vps and am getting this error

npm ERR! code 1
npm ERR! path /root/erza/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/root/erza/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.28/opus.node --module_name=opus --module_path=/root/erza/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.28 --napi_version=7 --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.2.0
npm ERR! node-pre-gyp info using node@14.15.4 | linux | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "/root/erza/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.28/opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.4.0/opus-v0.4.0-node-v83-napi-v3-linux-x64-glibc-2.28.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/discordjs/opus/releases/download/v0.4.0/opus-v0.4.0-node-v83-napi-v3-linux-x64-glibc-2.28.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.4.0/opus-v0.4.0-node-v83-napi-v3-linux-x64-glibc-2.28.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/discordjs/opus/releases/download/v0.4.0/opus-v0.4.0-node-v83-napi-v3-linux-x64-glibc-2.28.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@14.15.4 | linux | x64
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@14.15.4 | linux | x64
npm ERR! gyp info find Python using Python version 3.6.8 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/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   '/root/erza/node_modules/@discordjs/opus/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/root/.cache/node-gyp/14.15.4/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=/root/.cache/node-gyp/14.15.4',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/14.15.4/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/root/erza/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@14.15.4 | linux | x64
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:10:17)
npm ERR! gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:57:18
npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
npm ERR! gyp ERR! stack     at step (/usr/lib/node_modules/npm/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
npm ERR! gyp ERR! stack     at subStep (/usr/lib/node_modules/npm/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5

Further details:

  • @discordjs/opus version: 0.4.0
  • Node.js version: 14.15.4
  • Operating system: CentOS 8.3 x64

Not able to download a packages on termux nodejs lts

Error: > @discordjs/[email protected] install /data/data/com.termux/files/home/node_modules/@discordjs/opus

node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.2/opus-v0.3.2-node-v72-napi-v3-android-arm64-unknown-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
make: Entering directory '/data/data/com.termux/files/home/node_modules/@discordjs/opus/build'
CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o
warning: unknown warning option
'-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'? [-Wunknown-warning-option]
../deps/opus/src/opus_multistream.c:29:10: fatal error:
'config.h' file not found
#include "config.h"
^~~~~~~~~~
1 warning and 1 error generated.
make: *** [deps/libopus.target.mk:300: Release/obj.target/libopus/deps/opus/src/opus_multistream.o] Error 1
make: Leaving directory '/data/data/com.termux/files/home/node_modules/@discordjs/opus/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.14.62-19164009
gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/data/data/com.termux/files/home/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-android-arm64-unknown-unknown/opus.node" "--module_name=opus" "--module_path=/data/data/com.termux/files/home/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-android-arm64-unknown-unknown" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /data/data/com.termux/files/home/node_modules/@discordjs/opus
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/data/data/com.termux/files/usr/bin/node /data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/data/data/com.termux/files/home/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-android-arm64-unknown-unknown/opus.node --module_name=opus --module_path=/data/data/com.termux/files/home/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-android-arm64-unknown-unknown --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess. (/data/data/com.termux/files/home/node_modules/@discordjs/opus/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:72:20)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 4.14.62-19164009
node-pre-gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/home/node_modules/@discordjs/opus/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /data/data/com.termux/files/home/node_modules/@discordjs/opus
node-pre-gyp ERR! node -v v12.18.3
node-pre-gyp ERR! node-pre-gyp -v v0.1.0
node-pre-gyp ERR! not ok
Failed to execute '/data/data/com.termux/files/usr/bin/node /data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/data/data/com.termux/files/home/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-android-arm64-unknown-unknown/opus.node --module_name=opus --module_path=/data/data/com.termux/files/home/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-android-arm64-unknown-unknown --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN enoent ENOENT: no such file or directory, open '/data/data/com.termux/files/home/package.json'
npm WARN home No description
npm WARN home No repository field.
npm WARN home No README data
npm WARN home No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2020-09-30T19_05_57_035Z-debug.log

Does not install properly.

Please describe the problem you are having in as much detail as possible:
When I go to install the npm package it gives tons of errors.
Include a reproducible code sample here, if possible:

npm ERR! code 1
npm ERR! path E:\MUSICBot\node_modules\@discordjs\opus
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=E:\MUSICBot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-{libc_version}\opus.node --module_name=opus --module_path=E:\AJHSBot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-{libc_version} --napi_version=7 --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.17.0
npm ERR! node-pre-gyp info using node@15.5.1 | win32 | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "E:\MUSICBot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-{libc_version}\opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-%7Blibc_version%7D.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-%7Blibc_version%7D.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-%7Blibc_version%7D.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v88 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-%7Blibc_version%7D.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@15.5.1 | win32 | x64
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@15.5.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.1 found at "C:\Users\Conor\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack     at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:340:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:376:20)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1063:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=E:\\MUSICBot\\node_modules\\@discordjs\\opus\\prebuild\\node-v88-napi-v3-win32-x64-unknown-{libc_version}\\opus.node" "--module_name=opus" "--module_path=E:\\MUSICBot\\node_modules\\@discordjs\\opus\\prebuild\\node-v88-napi-v3-win32-x64-unknown-{libc_version}" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd E:\MUSICBot\node_modules\@discordjs\opus
npm ERR! gyp ERR! node -v v15.5.1
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 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=E:\MUSICBot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-{libc_version}\opus.node --module_name=opus --module_path=E:\MUSICBot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-{libc_version} --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (E:\MUSICBot\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:376:20)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1063:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19042
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\MUSICBot\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd E:\MUSICBot\node_modules\@discordjs\opus
npm ERR! node-pre-gyp ERR! node -v v15.5.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.17.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Conor\AppData\Local\npm-cache\_logs\2021-01-09T20_25_38_955Z-debug.log

Further details:
As Seen in the code above the package does not work. I have all of the dependencies installed as well.

  • @discordjs/opus version: 0.3.3
  • Node.js version: 15.5.1
  • Operating system: Unactivated Microsoft Windows 10 Home 64 Bit
  • Priority this issue should have – please be realistic and elaborate if possible:
    Medium as this does not install on a normal build of Windows 10, a very common operating system.

Unused Dependencies

Please describe the problem you are having in as much detail as possible:

Two entire dependencies are required but not used :(

  • patch-package: the library does not seem to have .patch files in its current state
  • postinstall-postinstall: the library does not use postinstall scripts in its current state

Further details:

  • @discordjs/opus version: 0.3.0
  • Priority this issue should have – please be realistic and elaborate if possible: low

Pre-built binaries not found for @discordjs/[email protected] and [email protected]

Estoy intentando utilizar el paquete "@discordjs/opus: ^0.3.3" pero resulta imposible porque al intentar descargar la dependencia no encuentra el archivo en la ruta https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v83-napi-v3-linux-arm-musl-1.1.24.tar.gz

`
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v83-napi-v3-linux-arm-musl-1.1.24.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v83 ABI, musl) (falling back to source compile with node-gyp)
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:315:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:465:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/node/app/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-arm-musl-1.1.24/opus.node" "--module_name=opus" "--module_path=/home/node/app/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-arm-musl-1.1.24" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /home/node/app/node_modules/@discordjs/opus
gyp ERR! node -v v14.15.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/node/app/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-arm-musl-1.1.24/opus.node --module_name=opus --module_path=/home/node/app/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-arm-musl-1.1.24 --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/node/app/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:72:20)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 4.19.66-v7+
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/node/app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/node/app/node_modules/@discordjs/opus
node-pre-gyp ERR! node -v v14.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.1.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/node/app/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-arm-musl-1.1.24/opus.node --module_name=opus --module_path=/home/node/app/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-arm-musl-1.1.24 --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2020-11-18T21_20_08_731Z-debug.log
`

  • @discordjs/opus version: ^0.3.3
  • Node.js version: 14.15
  • Operating system: Linux raspberrypi 4.19.66-v7+
  • Priority this issue should have – please be realistic and elaborate if possible:

resample

Hi!

in sources we have deps/opus/silk/resampler.c
can we wrap this functional to external usage?

I need to get pcm 8000 sample rate after decode opus (even it was 16000 or 24000 berore encoding) and search for solution. It would be great if libopus can do it without external library

The system cannot find the path specified.

Please describe the problem you are having in as much detail as possible:
trying to install opus
Include a reproducible code sample here, if possible:
$ npm install --build-from-source

> @discordjs/[email protected] install C:\Users\vampy\Documents\GitHub\Cookie\node_modules\@discordjs\opus
> node-pre-gyp install --fallback-to-build

The system cannot find the path specified.

npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the @discordjs/opus@0.3.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\vampy\AppData\Roaming\npm-cache\_logs\2020-07-26T16_43_30_239Z-debug.log

Further details:

  • @discordjs/opus version:0.3.2
  • Node.js version:14.6.0
  • Operating system:Windows 10
  • Priority this issue should have – please be realistic and elaborate if possible: Well ... Idk. But my discord bot cannot run without opus right now

Opus and Electron

Please describe the problem you are having in as much detail as possible:
i cannot use this opus encoder in electron?

Include a reproducible code sample here, if possible:

steps:
just try to run this opus encoder/decoder in an electron html.

internal/modules/cjs/loader.js:975 Uncaught Error: Cannot find module 'C:\Users\Luca\Desktop\discordClone\node_modules\@discordjs\opus\prebuild\electron-v11.0-napi-v3-win32-x64-unknown-unknown\opus.node'
Require stack:
- C:\Users\Luca\Desktop\discordClone\node_modules\@discordjs\opus\lib\index.js
- C:\Users\Luca\Desktop\discordClone\client\src\dist\index.js
- C:\Users\Luca\Desktop\discordClone\client\src\main.html
    at Module._resolveFilename (internal/modules/cjs/loader.js:972)
    at Function.i._resolveFilename (electron/js2c/renderer_init.js:35)
    at Module._load (internal/modules/cjs/loader.js:848)
    at Function.f._load (electron/js2c/asar_bundle.js:5)
    at Module.require (internal/modules/cjs/loader.js:1032)
    at require (internal/modules/cjs/helpers.js:72)
    at Object.<anonymous> (C:\Users\Luca\Desktop\discordClone\node_modules\@discordjs\opus\lib\index.js:5)
    at Object.<anonymous> (C:\Users\Luca\Desktop\discordClone\node_modules\@discordjs\opus\lib\index.js:9)
    at Module._compile (internal/modules/cjs/loader.js:1152)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173)

i tried copying the prebuild lib over to the specified directory but electron just unloads the page then.

  • @discordjs/opus version: 0.3.3
  • Node.js version: 15.2.1
  • Operating system: Windows 10 Pro 64Bit
  • Priority this issue should have – please be realistic and elaborate if possible:
    inconvenience

Error Crashing on installation

Currently trying to add voice support to my discord bot, running on a node.js locally hosted server

Crashes when running npm install @discordjs/opus

npm ERR! code 1
npm ERR! path A:\Documents\GitHub\CompSci-Discord-Bot\node_modules\@discordjs\opus
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'A:\Program Files\NodeJS\node.exe C:\Users\brend\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=A:\Documents\GitHub\CompSci-Discord-Bot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=A:\Documents\GitHub\CompSci-Discord-Bot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown --napi_version=7 --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 [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "A:\Documents\GitHub\CompSci-Discord-Bot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.4.0/opus-v0.4.0-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/discordjs/opus/releases/download/v0.4.0/opus-v0.4.0-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.4.0/opus-v0.4.0-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v88 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/discordjs/opus/releases/download/v0.4.0/opus-v0.4.0-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.0 found at "C:\Users\brend\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\brend\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack     at C:\Users\brend\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\brend\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack     at C:\Users\brend\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack     at C:\Users\brend\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack     at C:\Users\brend\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack     at C:\Users\brend\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:334:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:378:20)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19041
npm ERR! gyp ERR! command "A:\\Program Files\\NodeJS\\node.exe" "C:\\Users\\brend\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=A:\\Documents\\GitHub\\CompSci-Discord-Bot\\node_modules\\@discordjs\\opus\\prebuild\\node-v88-napi-v3-win32-x64-unknown-unknown\\opus.node" "--module_name=opus" "--module_path=A:\\Documents\\GitHub\\CompSci-Discord-Bot\\node_modules\\@discordjs\\opus\\prebuild\\node-v88-napi-v3-win32-x64-unknown-unknown" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd A:\Documents\GitHub\CompSci-Discord-Bot\node_modules\@discordjs\opus
npm ERR! gyp ERR! node -v v15.8.0
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 'A:\Program Files\NodeJS\node.exe C:\Users\brend\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=A:\Documents\GitHub\CompSci-Discord-Bot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=A:\Documents\GitHub\CompSci-Discord-Bot\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (A:\Documents\GitHub\CompSci-Discord-Bot\node_modules\@discordjs\node-pre-gyp\lib\util\compile.js:85:20)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:378:20)
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 Windows_NT 10.0.19041
npm ERR! node-pre-gyp ERR! command "A:\\Program Files\\NodeJS\\node.exe" "A:\\Documents\\GitHub\\CompSci-Discord-Bot\\node_modules\\@discordjs\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd A:\Documents\GitHub\CompSci-Discord-Bot\node_modules\@discordjs\opus
npm ERR! node-pre-gyp ERR! node -v v15.8.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.2.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\brend\AppData\Local\npm-cache\_logs\2021-02-06T00_33_39_388Z-debug.log

Further details:

  • @discordjs/opus version:
  • Node.js version: v15.8.0
  • Operating system: Windows 10
    Please advice a fix if at all possible

npm pre-built binaries not found, falling back to source compile

When running
npm install @discordjs/opus
npm says:
node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.2/opus-v0.3.2-node-v72-napi-v3-linux-x64-glibc-2.31.tar.gz node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp)

The url https://github.com/discordjs/opus/releases/download/v0.3.2/opus-v0.3.2-node-v72-napi-v3-linux-x64-glibc-2.31.tar.gz is wrong.
It should (probably) be: https://github.com/discordjs/opus/releases/download/v0.3.2/opus-v0.3.2-node-v72-napi-v3-linux-x64-glibc-2.27.tar.gz

  • @discordjs/opus version: 0.3.2
  • Node.js version: 14.2.0
  • Operating system: Ubuntu 20.04 LTS
  • Priority this issue should have low
    The installation with source compile succeeds so this wrong url is not really a problem. It is however neat to fix this.

Error playing music using opus even tho it seems to be installed correctly

Please describe the problem you are having in as much detail as possible:

11:13:12 AM  tunesdiscordbot-7f647j4s4l  Error: input stream: Status code:
	403
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at ClientRequest.<anonymous>
	(/app/node_modules/miniget/dist/index.js:156:27)
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at Object.onceWrapper
	(events.js:422:26)
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at ClientRequest.emit
	(events.js:315:20)
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at
	HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27)
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at
	HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at TLSSocket.socketOnData
	(_http_client.js:469:22)
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at TLSSocket.emit
	(events.js:315:20)
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at addChunk
	(_stream_readable.js:295:12)
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at readableAddChunk
	(_stream_readable.js:271:9)
11:13:12 AM  tunesdiscordbot-7f647j4s4l      at TLSSocket.Readable.push
	(_stream_readable.js:212:10)
listening to console logs .

Include a reproducible code sample here, if possible:

Further details:
Discord bot works as per usual until trying to play something in voice channel

@discordjs/opus version: 0.3.2
Node.js version: v12.16.2
Operating system: Linux
Priority this issue should have – please be realistic and elaborate if possible:

Failed to install

Fails on install script nodejs v: 14.3.0 npm v: 6.14.5

I also attempted to install with pnpm (v4.14.4) results into same error.

g++: error: Music/node_modules/node-addon-api: No such file or directory
make: *** [opus.target.mk:158: Release/obj.target/opus/src/node-opus.o] Error 1
make: Leaving directory '/home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/opus/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-31-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31/opus.node" "--module_name=opus" "--module_path=/home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/opus
gyp ERR! node -v v14.3.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31/opus.node --module_name=opus --module_path=/home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31 --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:72:20)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1051:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Linux 5.4.0-31-generic
node-pre-gyp ERR! command "/usr/bin/node" "/home/harsh-peshwani/Desktop/Saki Music/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/opus
node-pre-gyp ERR! node -v v14.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.1.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31/opus.node --module_name=opus --module_path=/home/harsh-peshwani/Desktop/Saki Music/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31 --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN [email protected] No description

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @discordjs/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/harsh-peshwani/.npm/_logs/2020-05-27T08_13_23_389Z-debug.log

Further details:

  • @discordjs/opus version: 0.3.2
  • Node.js version: 14.4.0
  • Operating system: Ubuntu 20.04 (x64)
  • Priority this issue should have – please be realistic and elaborate if possible: Normal

Could not convert AAC to OPUS

Hi. I am trying to convert aac file to opus file using this library. As I found, first of all I have to decode this from aac to Buffer and then encode with @discordjs/opus.

var AV = require('av');
require('aac');

const { OpusEncoder } = require('@discordjs/opus');
const encoder = new OpusEncoder(48000, 2);

var toBuffer = require('typedarray-to-buffer');

const createBuffer = require('audio-buffer-from');

const doConvert = async () => {
    const fileAddr = '/Users/pluhin/Downloads/1599913142871.aac';
    var asset = AV.Asset.fromFile(fileAddr);

    asset.on('buffer', percent => console.log("Loading audio file... %d%", percent));
    asset.on('decodeStart', () => console.log("Audio decoding started."));
    asset.on('error', err => console.log("Audio processing failed: %o", err));

    await asset.decodeToBuffer(buffer =>  {
        const encoded = encoder.encode(buffer);
        console.log('123');
    });


    asset.start();
}

doConvert();
  • @discordjs/opus version: ^0.3.2
  • Node.js version: v14.10.1
  • Operating system: macOs

This is my log. As I see, error in callback function, that means that error in encoder, but encoder didn't throw any error.

> [email protected] start /Users/pluhin/projects/anyvoice/test-convert-audio
> npx ts-node test.ts

Loading audio file... 61.099560884198354%
Loading audio file... 100%
Audio decoding started.

/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/asset.js:126
        return callback(buf);
               ^
Error: Unknown failure
    at /Users/pluhin/projects/anyvoice/test-convert-audio/test.ts:21:33
    at Asset.<anonymous> (/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/asset.js:126:16)
    at Asset.cb (/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/core/events.js:51:19)
    at Asset.EventEmitter.emit (/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/core/events.js:64:12)
    at Class.<anonymous> (/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/asset.js:202:24)
    at Class.EventEmitter.emit (/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/core/events.js:64:12)
    at Class.Decoder.decode (/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/decoder.js:90:14)
    at Class.<anonymous> (/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/decoder.js:54:26)
    at Class.EventEmitter.emit (/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/core/events.js:64:12)
    at FileSource.<anonymous> (/Users/pluhin/projects/anyvoice/test-convert-audio/node_modules/av/src/demuxer.js:51:24)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npx ts-node test.ts`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pluhin/.npm/_logs/2020-09-13T12_04_35_756Z-debug.log

Process finished with exit code 1

Online linux host cannot install discordjs/opus

Please describe the problem you are having in as much detail as possible:
Cannot install discordjs/opus when pushing the code to a online hosting system.

node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.2/opus-v0.3.2-node-v72-napi-v3-linux-x64-glibc-2.28.tar.gz

Include a reproducible code sample here, if possible:

// Place your code here

Further details:

  • @discordjs/opus version:
  • Node.js version: v12.16.2
  • Operating system: Linux
  • Priority this issue should have – please be realistic and elaborate if possible:

node-gyp gives me error...

Hello, I tried to install this package by:

npm install @discordjs/opus

but it gives me an error:

gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1gyp ERR! stack     at ChildProcess.onExit (C:\Users\JediCoding\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:376:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:284:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\JediCoding\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=F:\\Groove\\node_modules\\@discordjs\\opus\\prebuild\\node-v88-napi-v3-win32-x64-unknown-unknown\\opus.node" "--module_name=opus" "--module_path=F:\\Groove\\node_modules\\@discordjs\\opus\\prebuild\\node-v88-napi-v3-win32-x64-unknown-unknown" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd F:\Groove\node_modules\@discordjs\opus
gyp ERR! node -v v15.5.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\JediCoding\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=F:\Groove\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=F:\Groove\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (F:\Groove\node_modules\@discordjs\node-pre-gyp\lib\util\compile.js:72:20)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:376:20)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1063:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
node-pre-gyp ERR! System Windows_NT 10.0.19041
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "F:\\Groove\\node_modules\\@discordjs\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd F:\Groove\node_modules\@discordjs\opus
node-pre-gyp ERR! node -v v15.5.1
node-pre-gyp ERR! node-pre-gyp -v v0.1.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\JediCoding\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=F:\Groove\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=F:\Groove\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\JediCoding\AppData\Roaming\npm-cache\_logs\2021-01-23T06_41_44_411Z-debug.log

Install failed: patch-package not installed

Please describe the problem you are having in as much detail as possible: The title says it all

Include a reproducible code sample here, if possible:

$ npm install @discordjs/opus

> @discordjs/[email protected] install C:\Users\hzmi\Desktop\test\node_modules\@discordjs\opus
> patch-package && node-pre-gyp install --fallback-to-build

'patch-package' is not recognized as an internal or external command, operable program, or batch file.

Further details:

  • @discordjs/opus version: v0.2.0
  • Node.js Version: v12.16.2
  • Operating system: Windows Build 19041.208 (Insider slow ring)
  • The priority this issue should have – please be realistic and elaborate if possible: Critical?

encode() is not working

I cannot get encode to work. On a RPi4 the node environment will crash; on Windows the encode just prints Unknown Failure. Decode is working for me on both platforms. Even running with a static buffer, it fails.

var buffer = Buffer.alloc(8000,0);
const { OpusEncoder } = require('@discordjs/opus');

// Create the encoder.
// Specify 48kHz sampling rate and 2 channel size.
const encoder = new OpusEncoder(48000, 2);

// Encode and decode.
const encoded = encoder.encode(buffer);
const decoded = encoder.decode(encoded);

When I run on RPi4:

> const encoded = encoder.encode(buffer);
FATAL ERROR: Error::New napi_get_last_error_info
Aborted

On Windows:

> const encoded = encoder.encode(buffer);
Error: Unknown failure

Also tried the slightly larger test code in at https://gist.github.com/xnorpx/c5d12bb0211731980138c7fe33772f0e, same behavior.

I'd appreciate any insight or advice you could provide; I'm not that experience with testing or developing with native code in Node.

thanks.

Further details:

  • @discordjs/opus version: 0.3.2
  • Node.js version: v10.21.0 (RPi), v10.15.3 (Windows)
  • Operating system: Raspbian Buster, Windows 10 x64
  • Priority this issue should have – please be realistic and elaborate if possible:

RP4 Support?

Is your feature request related to a problem? Please describe.
Yes, the discord/opus cant be used on the RP4

Describe the ideal solution
A RP4 version from Discord/Opus

Describe alternatives you've considered
No, bc its the only way

@discordjs/opus failing a build on Heroku

Please describe the problem you are having in as much detail as possible:
Tried to install @discordjs/opus to use audio streaming and etc and it's failing on a heroku build

Include a reproducible code sample here, if possible:

-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       NODE_VERBOSE=false
       
-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 12.x...
       Downloading and installing node 12.16.3...
       Using default npm version: 6.14.4
       
-----> Restoring cache
       - node_modules is checked into source control and cannot be cached
       
-----> Installing dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       
       > @discordjs/[email protected] install /tmp/build_aa8678beaa8c32032607c57e2e8726d8/node_modules/@discordjs/opus
       > node-pre-gyp install --fallback-to-build
       
       sh: 1: node-pre-gyp: Permission denied
       npm ERR! code ELIFECYCLE
       npm ERR! errno 126
       npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
       npm ERR! Exit status 126
       npm ERR! 
       npm ERR! Failed at the @discordjs/[email protected] install script.
       npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.TkBdt/_logs/2020-05-07T13_44_09_511Z-debug.log
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       Some possible problems:
       
       - node_modules checked into source control
         https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
       
       - Node version not specified in package.json
         https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
       
       Love,
       Heroku
       
 !     Push rejected, failed to compile Node.js app.
 !     Push failed

Further details:

  • @discordjs/opus version: 0.3.2
  • Node.js version: 12.16.3
  • Operating system: Windows 10
  • Priority this issue should have – please be realistic and elaborate if possible: Low. This is a personal application so no stress to rush.

Error Node-pre-gyp cant download the pre-built binaries from github

When I downloading and installing discordjs/opus with npm, i get a error because node-pre-gyp cant download the release from github, because the version of glibc, on my computer i have the version "2.31" but on the releases page only have "2.27" version.

Further details:

  • @discordjs/opus version: 0.3.2
  • Node.js version: 14.2.0
  • Operating system: Manjaro Linux

cant install discord.js @discordjs/opus

Please describe the problem you are having in as much detail as possible:
when doing npm install discord.js @discordjs/opus i am getting the node-pre-gyp is not recognized as a command error.
i already installed node-pre-gyp with npm but still getting the same issue. i deleted python 3 and downloaded python 2.7 too since im using v15 of node i guess.
Include a reproducible code sample here, if possible:
npm install discord.js @discordjs/opus

// Place your code here

Further details:

  • @discordjs/opus version: none cause it doesnt install

  • Node.js version: v15.3.0 / Already tried v14.5.1 but same thats why i tried v15

  • Operating system: Windows 10 Pro 64 bit

  • Priority this issue should have – please be realistic and elaborate if possible:

2020-12-02T04_21_35_255Z-debug.log

Install issues

Please describe the problem you are having in as much detail as possible:
— This package fails to install via npm

Further details:

https://pastebin.com/raw/49uQSLjL

  • @discordjs/opus version:
  • Node.js version: v12.17.0
  • Operating system: macOS Catalina (c10.15.6)

Failing to install on Ubuntu 18.04 VPS

Please describe the problem you are having in as much detail as possible:
Errors out on Ubuntu 18.04 VPS during install. It is one of the dependencies for Corion

Include a reproducible code sample here, if possible:

npm i

and/or

npm i @discordjs/opus

Further details:

  • Error
npm ERR! Linux 4.15.0-134-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "@discordjs/opus"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/[email protected] install script 'node-pre-gyp install --fallback-to-build'.
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 @discordjs/opus package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @discordjs/opus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @discordjs/opus
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mountaint-dev/Corion/npm-debug.log
  • @discordjs/opus version: 0.3.3
  • Node.js version: 8.10.0
  • Operating system: Ubuntu 18.04
  • Priority this issue should have – please be realistic and elaborate if possible: Urgent. We need it to get our Music bot back up and running now that we got a new VPS.

Glibc version 2.28 missing

I am using @discordjs/opus version 0.3.3 for playing youtube streams in my discord server.
I updated the opus library from 0.1.0 for 0.3.3 and node-pre-gyp cannot install the opus library now.

pastebin of npm: https://pastebin.com/gtdSvMpu
pastebin of console output: https://pastebin.com/72wvq02T

It seems like there is version 2.28 missing. Debian 10 uses the latest stable build of libc6 Version 2.28
as shown here. https://packages.debian.org/search?keywords=libc6

Further details:

  • @discordjs/opus version: 0.3.3
  • Node.js version: 13.3.0
  • Operating system: Debian 10
  • Priority this issue should have – please be realistic and elaborate if possible: My Project Priority - Highest, Your Priority - Middle

It works

thanksssssssssssssssssssssssssssssssssssssssssssssssssss

Package fails to build on one machine but seems to work fine on another. (both Windows with WSL2)

Please describe the problem you are having in as much detail as possible: I have a Discord bot I'm working on. I have a windows 10 Desktop PC running WSL 2 (Ubuntu) and that is where I've installed @discordjs/opus. On my desktop machine this worked just fine with no issues. I checked out my project on my laptop with the same setup and I get an error when trying to npm install @discordjs/opus.

chev@C100003373:~/code/chevbot$ npm install @discordjs/opus

> @discordjs/[email protected] install /home/chev/code/chevbot/node_modules/@discordjs/opus
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.2/opus-v0.3.2-node-v79-napi-v3-linux-x64-glibc-2.31.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v79 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/chev/code/chevbot/node_modules/@discordjs/opus/build'
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_projection_encoder.o
  CC(target) Release/obj.target/libopus/deps/opus/src/analysis.o
  CC(target) Release/obj.target/libopus/deps/opus/src/mlp_data.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_encoder.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_projection_decoder.o
  CC(target) Release/obj.target/libopus/deps/opus/src/mapping_matrix.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_compare.o
  CC(target) Release/obj.target/libopus/deps/opus/src/mlp.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_decoder.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_decoder.o
  CC(target) Release/obj.target/libopus/deps/opus/src/repacketizer.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_encoder.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_frame.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/inner_product_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_vector_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pred_coefs_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/schur_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/warped_autocorrelation_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/burg_modified_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LPC_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_inv_pred_gain_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_copy_vector_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/noise_shape_analysis_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/pitch_analysis_core_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/bwexpander_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_analysis_filter_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_scale_ctrl_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/corrMatrix_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/encode_frame_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/sort_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pitch_lags_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/residual_energy_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_analysis_filter_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/autocorrelation_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/k2a_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/regularize_correlations_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LTP_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/energy_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/apply_sine_window_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/wrappers_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/process_gains_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_quant_pred.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_inv_pred_gain.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/process_NLSFs.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NSQ.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/check_control_input.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_del_dec_quant.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_analysis_filter.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/dec_API.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/sort.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/VAD.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_AR2.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_fit.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/control_SNR.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_parameters.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/pitch_est_tables.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/warped_autocorrelation_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/apply_sine_window_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/residual_energy16_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/schur64_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/residual_energy_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/noise_shape_analysis_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/encode_frame_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/schur_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/autocorr_FIX.o
../deps/opus/silk/fixed/autocorr_FIX.c: In function ‘silk_autocorr’:
../deps/opus/silk/fixed/autocorr_FIX.c:47:29: warning: passing argument 1 of ‘_celt_autocorr’ from incompatible pointer type [-Wincompatible-pointer-types]
   47 |     *scale = _celt_autocorr(inputData, results, NULL, 0, corrCount-1, inputDataSize, arch);
      |                             ^~~~~~~~~
      |                             |
      |                             const opus_int16 * {aka const short int *}
In file included from ../deps/opus/silk/fixed/autocorr_FIX.c:33:
../deps/opus/celt/celt_lpc.h:63:38: note: expected ‘const opus_val16 *’ {aka ‘const float *’} but argument is of type ‘const opus_int16 *’ {aka ‘const short int *’}
   63 | int _celt_autocorr(const opus_val16 *x, opus_val32 *ac,
      |                    ~~~~~~~~~~~~~~~~~~^
../deps/opus/silk/fixed/autocorr_FIX.c:47:40: warning: passing argument 2 of ‘_celt_autocorr’ from incompatible pointer type [-Wincompatible-pointer-types]
   47 |     *scale = _celt_autocorr(inputData, results, NULL, 0, corrCount-1, inputDataSize, arch);
      |                                        ^~~~~~~
      |                                        |
      |                                        opus_int32 * {aka int *}
In file included from ../deps/opus/silk/fixed/autocorr_FIX.c:33:
../deps/opus/celt/celt_lpc.h:63:53: note: expected ‘opus_val32 *’ {aka ‘float *’} but argument is of type ‘opus_int32 *’ {aka ‘int *’}
   63 | int _celt_autocorr(const opus_val16 *x, opus_val32 *ac,
      |                                         ~~~~~~~~~~~~^~
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/burg_modified_FIX.o
../deps/opus/silk/fixed/burg_modified_FIX.c: In function ‘silk_burg_modified_c’:
../deps/opus/silk/fixed/burg_modified_FIX.c:98:30: warning: passing argument 1 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]
   98 |             celt_pitch_xcorr(x_ptr, x_ptr + 1, xcorr, subfr_length - D, D, arch );
      |                              ^~~~~
      |                              |
      |                              const opus_int16 * {aka const short int *}
In file included from ../deps/opus/silk/fixed/burg_modified_FIX.c:35:
../deps/opus/celt/pitch.h:185:38: note: expected ‘const opus_val16 *’ {aka ‘const float *’} but argument is of type ‘const opus_int16 *’ {aka ‘const short int *’}
  185 | celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y,
      |                    ~~~~~~~~~~~~~~~~~~^~
../deps/opus/silk/fixed/burg_modified_FIX.c:98:43: warning: passing argument 2 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]
   98 |             celt_pitch_xcorr(x_ptr, x_ptr + 1, xcorr, subfr_length - D, D, arch );
      |                                     ~~~~~~^~~
      |                                           |
      |                                           const opus_int16 * {aka const short int *}
In file included from ../deps/opus/silk/fixed/burg_modified_FIX.c:35:
../deps/opus/celt/pitch.h:185:60: note: expected ‘const opus_val16 *’ {aka ‘const float *’} but argument is of type ‘const opus_int16 *’ {aka ‘const short int *’}
  185 | celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y,
      |                                          ~~~~~~~~~~~~~~~~~~^~
../deps/opus/silk/fixed/burg_modified_FIX.c:98:48: warning: passing argument 3 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]
   98 |             celt_pitch_xcorr(x_ptr, x_ptr + 1, xcorr, subfr_length - D, D, arch );
      |                                                ^~~~~
      |                                                |
      |                                                opus_int32 * {aka int *}
In file included from ../deps/opus/silk/fixed/burg_modified_FIX.c:35:
../deps/opus/celt/pitch.h:186:19: note: expected ‘opus_val32 *’ {aka ‘float *’} but argument is of type ‘opus_int32 *’ {aka ‘int *’}
  186 |       opus_val32 *xcorr, int len, int max_pitch, int arch);
      |       ~~~~~~~~~~~~^~~~~
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/pitch_analysis_core_FIX.o
../deps/opus/silk/fixed/pitch_analysis_core_FIX.c: In function ‘silk_pitch_analysis_core’:
../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:200:27: warning: passing argument 1 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]
  200 |         celt_pitch_xcorr( target_ptr, target_ptr - MAX_LAG_4KHZ, xcorr32, SF_LENGTH_8KHZ, MAX_LAG_4KHZ - MIN_LAG_4KHZ + 1, arch );
      |                           ^~~~~~~~~~
      |                           |
      |                           const opus_int16 * {aka const short int *}
In file included from ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:39:
../deps/opus/celt/pitch.h:185:38: note: expected ‘const opus_val16 *’ {aka ‘const float *’} but argument is of type ‘const opus_int16 *’ {aka ‘const short int *’}
  185 | celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y,
      |                    ~~~~~~~~~~~~~~~~~~^~
../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:200:50: warning: passing argument 2 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]
  200 |         celt_pitch_xcorr( target_ptr, target_ptr - MAX_LAG_4KHZ, xcorr32, SF_LENGTH_8KHZ, MAX_LAG_4KHZ - MIN_LAG_4KHZ + 1, arch );
      |                                                  ^
      |                                                  |
      |                                                  const opus_int16 * {aka const short int *}
In file included from ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:39:
../deps/opus/celt/pitch.h:185:60: note: expected ‘const opus_val16 *’ {aka ‘const float *’} but argument is of type ‘const opus_int16 *’ {aka ‘const short int *’}
  185 | celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y,
      |                                          ~~~~~~~~~~~~~~~~~~^~
../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:200:66: warning: passing argument 3 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]
  200 |         celt_pitch_xcorr( target_ptr, target_ptr - MAX_LAG_4KHZ, xcorr32, SF_LENGTH_8KHZ, MAX_LAG_4KHZ - MIN_LAG_4KHZ + 1, arch );
      |                                                                  ^~~~~~~
      |                                                                  |
      |                                                                  opus_int32 * {aka int *}
In file included from ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:39:
../deps/opus/celt/pitch.h:186:19: note: expected ‘opus_val32 *’ {aka ‘float *’} but argument is of type ‘opus_int32 *’ {aka ‘int *’}
  186 |       opus_val32 *xcorr, int len, int max_pitch, int arch);
      |       ~~~~~~~~~~~~^~~~~
../deps/opus/silk/fixed/pitch_analysis_core_FIX.c: In function ‘silk_P_Ana_calc_corr_st3’:
../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:616:27: warning: passing argument 1 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]
  616 |         celt_pitch_xcorr( target_ptr, target_ptr - start_lag - lag_high, xcorr32, sf_length, lag_high - lag_low + 1, arch );
      |                           ^~~~~~~~~~
      |                           |
      |                           const opus_int16 * {aka const short int *}
In file included from ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:39:
../deps/opus/celt/pitch.h:185:38: note: expected ‘const opus_val16 *’ {aka ‘const float *’} but argument is of type ‘const opus_int16 *’ {aka ‘const short int *’}
  185 | celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y,
      |                    ~~~~~~~~~~~~~~~~~~^~
../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:616:62: warning: passing argument 2 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]
  616 |         celt_pitch_xcorr( target_ptr, target_ptr - start_lag - lag_high, xcorr32, sf_length, lag_high - lag_low + 1, arch );
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
      |                                                              |
      |                                                              const opus_int16 * {aka const short int *}
In file included from ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:39:
../deps/opus/celt/pitch.h:185:60: note: expected ‘const opus_val16 *’ {aka ‘const float *’} but argument is of type ‘const opus_int16 *’ {aka ‘const short int *’}
  185 | celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y,
      |                                          ~~~~~~~~~~~~~~~~~~^~
../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:616:74: warning: passing argument 3 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]
  616 |         celt_pitch_xcorr( target_ptr, target_ptr - start_lag - lag_high, xcorr32, sf_length, lag_high - lag_low + 1, arch );
      |                                                                          ^~~~~~~
      |                                                                          |
      |                                                                          opus_int32 * {aka int *}
In file included from ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:39:
../deps/opus/celt/pitch.h:186:19: note: expected ‘opus_val32 *’ {aka ‘float *’} but argument is of type ‘opus_int32 *’ {aka ‘int *’}
  186 |       opus_val32 *xcorr, int len, int max_pitch, int arch);
      |       ~~~~~~~~~~~~^~~~~
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/find_LTP_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/find_LPC_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/corrMatrix_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/k2a_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/LTP_scale_ctrl_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/process_gains_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/k2a_Q16_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/regularize_correlations_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/LTP_analysis_filter_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/vector_ops_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/find_pitch_lags_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/find_pred_coefs_FIX.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/control_audio_bandwidth.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decoder_set_fs.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_unpack.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/bwexpander.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_rom.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/shell_coder.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_pulses.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/bwexpander_32.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_core.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/PLC.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_NLSF_CB_WB.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/table_LSF_cos.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_pulses_per_block.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_gain.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/inner_prod_aligned.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2_3.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NSQ_del_dec.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_pitch.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_VQ_weights_laroia.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/interpolate.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/debug.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_other.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/LP_variable_cutoff.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_decode.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/encode_pulses.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/control_codec.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_LR_to_MS.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/HP_variable_cutoff.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/encode_indices.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/init_decoder.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_encode_pred.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_VQ.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/init_encoder.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_IIR_FIR.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_up2_HQ.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/sigm_Q15.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/sum_sqr_shift.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_LTP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/code_signs.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_NLSF_CB_NB_MB.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/gain_quant.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_pitch_lag.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_stabilize.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_find_predictor.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/A2NLSF.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF2A.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/VQ_WMat_EC.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_encode.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/log2lin.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_decode_pred.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/lin2log.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/CNG.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/enc_API.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/biquad_alt.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/quant_LTP_gains.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_down_FIR.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/ana_filt_bank_1.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_MS_to_LR.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_indices.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/rate.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/entdec.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/modes.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/celt_lpc.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/laplace.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/cwrs.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/celt.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/entcode.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/celt_decoder.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/celt_encoder.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/mdct.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/quant_bands.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/vq.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/bands.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/kiss_fft.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/entenc.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/mathops.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/pitch.o
  AR(target) Release/obj.target/deps/opus.a
  COPY Release/opus.a
  CXX(target) Release/obj.target/opus/src/node-opus.o
make: g++: Command not found
make: *** [opus.target.mk:156: Release/obj.target/opus/src/node-opus.o] Error 127
make: Leaving directory '/home/chev/code/chevbot/node_modules/@discordjs/opus/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/chev/.nvm/versions/node/v13.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:219:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
gyp ERR! System Linux 4.19.104-microsoft-standard
gyp ERR! command "/home/chev/.nvm/versions/node/v13.3.0/bin/node" "/home/chev/.nvm/versions/node/v13.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/chev/code/chevbot/node_modules/@discordjs/opus/prebuild/node-v79-napi-v3-linux-x64-glibc-2.31/opus.node" "--module_name=opus" "--module_path=/home/chev/code/chevbot/node_modules/@discordjs/opus/prebuild/node-v79-napi-v3-linux-x64-glibc-2.31" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /home/chev/code/chevbot/node_modules/@discordjs/opus
gyp ERR! node -v v13.3.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/chev/.nvm/versions/node/v13.3.0/bin/node /home/chev/.nvm/versions/node/v13.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/chev/code/chevbot/node_modules/@discordjs/opus/prebuild/node-v79-napi-v3-linux-x64-glibc-2.31/opus.node --module_name=opus --module_path=/home/chev/code/chevbot/node_modules/@discordjs/opus/prebuild/node-v79-napi-v3-linux-x64-glibc-2.31 --napi_version=5 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/chev/code/chevbot/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:72:20)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:219:5)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1027:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:5)
node-pre-gyp ERR! System Linux 4.19.104-microsoft-standard
node-pre-gyp ERR! command "/home/chev/.nvm/versions/node/v13.3.0/bin/node" "/home/chev/code/chevbot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/chev/code/chevbot/node_modules/@discordjs/opus
node-pre-gyp ERR! node -v v13.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.1.0
node-pre-gyp ERR! not ok
Failed to execute '/home/chev/.nvm/versions/node/v13.3.0/bin/node /home/chev/.nvm/versions/node/v13.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/chev/code/chevbot/node_modules/@discordjs/opus/prebuild/node-v79-napi-v3-linux-x64-glibc-2.31/opus.node --module_name=opus --module_path=/home/chev/code/chevbot/node_modules/@discordjs/opus/prebuild/node-v79-napi-v3-linux-x64-glibc-2.31 --napi_version=5 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN [email protected] No description
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/chev/.npm/_logs/2020-07-30T03_52_56_967Z-debug.log

Though I know node.js pretty well, when it comes to troubleshooting binary dependency building it's all Greek to me.

Full npm log in case it helps: https://gist.github.com/chevtek/32c79cd3a613213abdb6ad719d6ba2bf

Further details:

  • @discordjs/opus version: 3.2
  • Node.js version: I tried many different versions, but we'll just say the latest - v14.7.0
  • Operating system: Technically Ubuntu, but it's WSL 2 on Windows.
  • Priority this issue should have – please be realistic and elaborate if possible: Not urgent at all.

Buffer

Please describe the problem you are having in as much detail as possible:
When i try to construct the Method OpusEncoder node exits with errno 4294930435 or with Error: Cannot create a Buffer larger than 0x100000000 bytes.

The first one occurs only when rate is set to 32000 on the constructor and the scond on on every other rate

Include a reproducible code sample here, if possible:
just construct OpusEncoder.

import Microphone from 'node-microphone'
import { io } from 'socket.io-client'
import { OpusEncoder } from '@discordjs/opus'

const socket = io("http://localhost:3000");
const encoder = new OpusEncoder(16000, 2);


var mic = new Microphone({
    bitwidth: 16,
    channels: 1,
    rate: 32000,
    encoding: 'unsigned-integer',
    endian: 'big'
});

var micStream = mic.startRecording();

micStream.on('data', (data) => {
    var encodedData = encoder.encode(data);
    console.log(encodedData);
    socket.emit('stream', data);
});

Further details:
the problem occurs in line 6

  • @discordjs/opus version:

  • Node.js version: 15.3.0

  • Operating system: Windows 10 Pro 64bit

  • Priority this issue should have – please be realistic and elaborate if possible:
    medium

Prebuilt binaries for Alpine linux?

Alpine Linux uses musl instead of glibc, making this package not compatible with Alpine Linux. I don't know if using a compatibility layer would work.

Missing dependency "node-pre-gyp"

Please describe the problem you are having in as much detail as possible:
The module can not be loaded after installation.

Include a reproducible code sample here, if possible:

npm i @discordjs/opus && node --eval 'require("@discordjs/opus");'

Further details:
Fails with:

Error: Cannot find module 'node-pre-gyp'
  • @discordjs/opus version: 0.3.1
  • Node.js version: 14 (same issue with 12)
  • Operating system: Debian 10
  • Priority this issue should have – please be realistic and elaborate if possible: low - it can be worked around by manually installing node-pre-gyp

Can't install @discordjs/opus with npm

I want to install @discordjs/opus but i have a error:

Console logging

> @discordjs/[email protected] install C:\Hebergement\Discord\Robots\Among_Us\node_modules\@discordjs\opus
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v72-napi-v3-win32-ia32-unknown-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS checking VS2019 (16.7.30621.155) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:310:5)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Hebergement\\Discord\\Robots\\Among_Us\\node_modules\\@discordjs\\opus\\prebuild\\node-v72-napi-v3-win32-ia32-unknown-unknown\\opus.node" "--module_name=opus" "--module_path=C:\\Hebergement\\Discord\\Robots\\Among_Us\\node_modules\\@discordjs\\opus\\prebuild\\node-v72-napi-v3-win32-ia32-unknown-unknown" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd C:\Hebergement\Discord\Robots\Among_Us\node_modules\@discordjs\opus
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Hebergement\Discord\Robots\Among_Us\node_modules\@discordjs\opus\prebuild\node-v72-napi-v3-win32-ia32-unknown-unknown\opus.node --module_name=opus --module_path=C:\Hebergement\Discord\Robots\Among_Us\node_modules\@discordjs\opus\prebuild\node-v72-napi-v3-win32-ia32-unknown-unknown --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Hebergement\Discord\Robots\Among_Us\node_modules\@discordjs\node-pre-gyp\lib\util\compile.js:72:20)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Hebergement\\Discord\\Robots\\Among_Us\\node_modules\\@discordjs\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Hebergement\Discord\Robots\Among_Us\node_modules\@discordjs\opus
node-pre-gyp ERR! node -v v12.18.4
node-pre-gyp ERR! node-pre-gyp -v v0.1.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Hebergement\Discord\Robots\Among_Us\node_modules\@discordjs\opus\prebuild\node-v72-napi-v3-win32-ia32-unknown-unknown\opus.node --module_name=opus --module_path=C:\Hebergement\Discord\Robots\Among_Us\node_modules\@discordjs\opus\prebuild\node-v72-napi-v3-win32-ia32-unknown-unknown --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN among_us@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/opus@0.3.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Valentin\AppData\Roaming\npm-cache\_logs\2020-11-01T19_28_21_402Z-debug.log

Further details:

  • @discordjs/opus version: N/A (I think is lastest)
  • Node.js version: 12.18.4
  • Operating system: Windows 10
  • Priority this issue should have – please be realistic and elaborate if possible: any

NPM install fails on ec2 server

Hey! Trying to install setup a project using an AWS ec2 server. It seems that there are some errors with opus? Any idea on how to fix this?

npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated

> @discordjs/[email protected] install /home/ec2-user/progra/cosmos/node_modules/@discordjs/opus
> patch-package && node-pre-gyp install --fallback-to-build

patch-package 6.2.2
Applying patches...
Error: Patch file found for package node-pre-gyp which is not present at node_modules/node-pre-gyp
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.2.1/opus-v0.2.1-node-v48-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v48 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory `/home/ec2-user/progra/cosmos/node_modules/@discordjs/opus/build'
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o
make: cc: Command not found
make: *** [Release/obj.target/libopus/deps/opus/src/opus_multistream.o] Error 127
make: Leaving directory `/home/ec2-user/progra/cosmos/node_modules/@discordjs/opus/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Linux 4.14.173-137.229.amzn2.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/ec2-user/progra/cosmos/node_modules/@discordjs/opus/prebuild/node-v48-linux-x64-glibc/opus.node" "--module_name=opus" "--module_path=/home/ec2-user/progra/cosmos/node_modules/@discordjs/opus/prebuild/node-v48-linux-x64-glibc" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v48"
gyp ERR! cwd /home/ec2-user/progra/cosmos/node_modules/@discordjs/opus
gyp ERR! node -v v6.17.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ec2-user/progra/cosmos/node_modules/@discordjs/opus/prebuild/node-v48-linux-x64-glibc/opus.node --module_name=opus --module_path=/home/ec2-user/progra/cosmos/node_modules/@discordjs/opus/prebuild/node-v48-linux-x64-glibc --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v48' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/ec2-user/progra/cosmos/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:920:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
node-pre-gyp ERR! System Linux 4.14.173-137.229.amzn2.x86_64
node-pre-gyp ERR! command "/usr/bin/node" "/home/ec2-user/progra/cosmos/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ec2-user/progra/cosmos/node_modules/@discordjs/opus
node-pre-gyp ERR! node -v v6.17.1
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ec2-user/progra/cosmos/node_modules/@discordjs/opus/prebuild/node-v48-linux-x64-glibc/opus.node --module_name=opus --module_path=/home/ec2-user/progra/cosmos/node_modules/@discordjs/opus/prebuild/node-v48-linux-x64-glibc --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v48' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none was installed.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.6 but none was installed.
npm WARN [email protected] requires a peer of sodium@^3.0.2 but none was installed.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN [email protected] requires a peer of zlib-sync@^0.1.6 but none was installed.
npm WARN [email protected] requires a peer of ffmpeg-static@^2.4.0 || ^3.0.0 but none was installed.
npm WARN [email protected] requires a peer of @discordjs/opus@^0.1.0 but none was installed.
npm WARN [email protected] requires a peer of node-opus@^0.3.1 but none was installed.
npm WARN [email protected] requires a peer of opusscript@^0.0.6 but none was installed.
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm ERR! Linux 4.14.173-137.229.amzn2.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "--unsafe-perm"
npm ERR! node v6.17.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! @discordjs/[email protected] install: `patch-package && node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/[email protected] install script 'patch-package && node-pre-gyp install --fallback-to-build'.
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 @discordjs/opus package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     patch-package && node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @discordjs/opus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @discordjs/opus
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ec2-user/progra/cosmos/npm-debug.log

Cannot npm install package

Please describe the problem you are having in as much detail as possible:
Error output:

$ npm i @discordjs/opus

> @discordjs/[email protected] install C:\Code\Personal\discord-bot\node_modules\@discordjs\opus
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.2/opus-v0.3.2-node-v64-napi-v3-win32-x64-unknown-unknown.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)   
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\mdabler\AppData\Local\Programs\Python\Python38-32\python.EXE -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 (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\mdabler\\AppData\\Roaming\\nvm\\v10.16.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Code\\Personal\\discord-bot\\node_modules\\@discordjs\\opus\\prebuild\\node-v64-napi-v3-win32-x64-unknown-unknown\\opus.node" "--module_name=opus" "--module_path=C:\\Code\\Personal\\discord-bot\\node_modules\\@discordjs\\opus\\prebuild\\node-v64-napi-v3-win32-x64-unknown-unknown" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3" "--msvs_version=2017"
gyp ERR! cwd C:\Code\Personal\discord-bot\node_modules\@discordjs\opus
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\mdabler\AppData\Roaming\nvm\v10.16.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Code\Personal\discord-bot\node_modules\@discordjs\opus\prebuild\node-v64-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=C:\Code\Personal\discord-bot\node_modules\@discordjs\opus\prebuild\node-v64-napi-v3-win32-x64-unknown-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3 --msvs_version=2017' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Code\Personal\discord-bot\node_modules\@discordjs\node-pre-gyp\lib\util\compile.js:72:20)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Code\\Personal\\discord-bot\\node_modules\\@discordjs\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Code\Personal\discord-bot\node_modules\@discordjs\opus
node-pre-gyp ERR! node -v v10.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.1.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\mdabler\AppData\Roaming\nvm\v10.16.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Code\Personal\discord-bot\node_modules\@discordjs\opus\prebuild\node-v64-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=C:\Code\Personal\discord-bot\node_modules\@discordjs\opus\prebuild\node-v64-napi-v3-win32-x64-unknown-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3 --msvs_version=2017' (1)
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^3.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of zlib-sync@^0.1.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ffmpeg-static@^2.4.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @discordjs/opus@^0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mdabler\AppData\Roaming\npm-cache\_logs\2020-08-14T14_26_02_466Z-debug.log

Include a reproducible code sample here, if possible:
All I am doing is running npm i discordjs/opus and I have also tried npm installing from some of the tarball urls but get the same error.

  • Node.js version: 10.16.0
  • Operating system: Windows 10 Pro

what about the docs

Npm library node-opus is unmaintained and recommends to use this library instead. I know, it seems to you, maybe, unnecessary to add documentation for the library. But can you provide some readme and a few examples of usage? I think it can boost up the number of users for this library, cause now for me as a simple js-developer, not really obvious how to switch from node-opus to @discordjs/opus or even how to use this library.

I would appreciate your help.

Install fails with github actions

Please describe the problem you are having in as much detail as possible:
node-pre-gyp not found when installing the package on Github Actions

Include a reproducible code sample here, if possible:

yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /home/runner/work/Q-Bot/Q-Bot/node_modules/@discordjs/opus: Command failed.
Exit code: 1
Command: patch-package && node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /home/runner/work/Q-Bot/Q-Bot/node_modules/@discordjs/opus
Output:
patch-package 6.2.2
Applying patches...
Error: Patch file found for package node-pre-gyp which is not present at node_modules/node-pre-gyp
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
##[error]Process completed with exit code 1.

Further details:

  • @discordjs/opus version: 0.2.1
  • Node.js version: v12
  • Operating system: ubuntu-latest
  • Priority this issue should have – please be realistic and elaborate if possible: Not that much important, but still annoying (might be my fault with my CI config)

Win32 build support

When trying to install a package under win32, the build fails because the config.h file cannot be found. I was able to fix it by simply copying the x64 folder and renaming it to ia32.

Cannot run on Raspberry Pi

Please describe the problem you are having in as much detail as possible:
Whenever my bot is requested to play something in the voice channel it crashes and presents this error code:
Include a reproducible code sample here, if possible:

I could not join the voice channel: Error: Error: Cannot find module '/home/pi/Documents/GitHub/JSbot/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-arm-glibc-2.28/opus.node'
Require stack:

Further details:

  • @discordjs/opus version: v0.3.3
  • Node.js version: 14.15.1
  • Operating system: Raspberry Pi OS 32bit
  • Priority this issue should have – please be realistic and elaborate if possible: Medium. Doesn't seem like it affects many other users

npm module still on version 0.3.3

I'm not entirely familiar with posting to npm, however it is still on version 0.3.3. Figured I'd open an issue in case this was overlooked.

Old GLIBC_2.29 dependency crashes Opus

I am not able to play music, since after calling play on a voice channel I get:

(node:12145) UnhandledPromiseRejectionWarning: Error: Could not find an Opus module! Please install @discordjs/opus, node-opus, or opusscript.
    at new OpusStream (/home/user/DiscordBot/node_modules/prism-media/src/opus/Opus.js:42:13)
    at new Encoder (/home/user/DiscordBot/node_modules/prism-media/src/opus/Opus.js:130:5)
    at AudioPlayer.playPCMStream (/home/user/DiscordBot/node_modules/discord.js/src/client/voice/player/BasePlayer.js:58:34)
    at AudioPlayer.playUnknown (/home/user/DiscordBot/node_modules/discord.js/src/client/voice/player/BasePlayer.js:53:17)
    at VoiceConnection.play (/home/user/DiscordBot/node_modules/discord.js/src/client/voice/util/PlayInterface.js:71:28)
    at play (/home/user/DiscordBot/index.js:10:29)
    at targetChannel.join.then.connection (/home/user/DiscordBot/index.js:39:61)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:12145) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12145) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I examined that closer by starting node and calling require("@discordjs/opus") with the following result:

Error: /snap/core/current/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/user/DiscordBot/node_modules/@discordjs/opus/prebuild/node-v67-linux-x64-glibc/opus.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:857:18)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)

I am at Ubuntu Focal Fossa, having libc6 installed... however it's version 2.31. This is quite awkward. How to deal with that / shouldn't it be fixed?

Linux install 404

When running npm install @discordjs/opus on linux it throws up a 404 error

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.1.0/opus-v0.1.0-node-v64-linux-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 

image

Looking at the releases the URL should most likely be opus-v0.1.0-node-v72-linux-x64.tar.gz
I dont really know enough about node packages to know why this is happening but I assume its a publishing issue?

Not able to encode wav file

I am trying to convert a WAV file using Node's fs.readFile and passing that buffer to encoder.encode. I get neither the result or a error thrown with a explanation of what is wrong. This is basically the example you have in the docs... right?

Bug? By design? or me missing something?

Online example: https://codesandbox.io/s/funny-jones-d7sls?file=/src/index.js

const audioBuffer = await fs
    .readFile(file)
    .catch(err => console.log("Error reading input file:", err));

  console.log("LENGTH:", audioBuffer.length); // all good so far...
  const encoder = new OpusEncoder(41000, 2);

  let encoded = null;
  try {
    console.log("Trying to encode..."); // log runs
    encoded = encoder.encode(audioBuffer);
    console.log("Encoded!"); // log doesn't run :(
  } catch (err) {
    console.log("Encoding failed:", err); // no error thrown... :'(
  }
  return encoded;

Further details:

  • @discordjs/opus version: ^0.3.2
  • Node.js version: v14.2.0
  • Operating system: Mac Mojave (10.14.6)

Install issues on WSL2

Please describe the problem you are having in as much detail as possible:

This package fails to install via npm on my WSL2 Ubuntu installation. See output below.

This is only the second project I've done on this install, so the environment should be relatively pristine. Not an expert at Linux so if you need more information about it please let me know what to run :)

Looking at the output, it seems like there are two issues present:

Include a reproducible code sample here, if possible:

marcus@Longclaw:/mnt/c/Users/Marcus/programming/music-bot$ sudo npm i --save @discordjs/opus

> @discordjs/[email protected] install /mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.2/opus-v0.3.2-node-v72-napi-v3-linux-x64-glibc-2.31.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp) 
gyp WARN EACCES current user ("marcus") does not have permission to access the dev dir "/root/.cache/node-gyp/12.18.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus/.node-gyp"
make: Entering directory '/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus/build'
make: *** No rule to make target '../.node-gyp/12.18.0/include/node/common.gypi', needed by 'Makefile'.  Stop.
make: Leaving directory '/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.4.0-18362-Microsoft
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.31/opus.node" "--module_name=opus" "--module_path=/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.31" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus
gyp ERR! node -v v12.18.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.31/opus.node --module_name=opus --module_path=/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.31 --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:72:20)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 4.4.0-18362-Microsoft
node-pre-gyp ERR! command "/usr/local/bin/node" "/mnt/c/Users/Marcus/programming/music-bot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus
node-pre-gyp ERR! node -v v12.18.0
node-pre-gyp ERR! node-pre-gyp -v v0.1.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.31/opus.node --module_name=opus --module_path=/mnt/c/Users/Marcus/programming/music-bot/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.31 --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @discordjs/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-06-15T01_46_32_274Z-debug.log

Further details:

  • @discordjs/opus version:
  • Node.js version: v12.18.0
  • Operating system: Linux 4.4.0-18362-Microsoft (WSL2 Ubuntu)
  • Priority this issue should have – please be realistic and elaborate if possible:
    • Medium, build fails on relatively common OS configuration

Unable to install

Please describe the problem you are having in as much detail as possible:
When I run npm i @discordjs/opus I get a build error:

Include a reproducible code sample here, if possible:

npm i @discordjs/opus

> @discordjs/[email protected] install /home/fred/Wavynn/node_modules/@discordjs/opus
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.2/opus-v0.3.2-node-v83-napi-v3-linux-x64-glibc-2.31.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v83 ABI, glibc) (falling back to source compile with node-gyp) 
gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/home/fred/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/home/fred/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/home/fred/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /home/fred/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /home/fred/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /home/fred/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:175:21)
gyp ERR! System Linux 4.4.0-18362-Microsoft
gyp ERR! command "/home/fred/.nvm/versions/node/v14.4.0/bin/node" "/home/fred/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/fred/Wavynn/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31/opus.node" "--module_name=opus" "--module_path=/home/fred/Wavynn/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /home/fred/Wavynn/node_modules/@discordjs/opus
gyp ERR! node -v v14.4.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/home/fred/.nvm/versions/node/v14.4.0/bin/node /home/fred/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/fred/Wavynn/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31/opus.node --module_name=opus --module_path=/home/fred/Wavynn/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31 --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/fred/Wavynn/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:72:20)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1051:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Linux 4.4.0-18362-Microsoft
node-pre-gyp ERR! command "/home/fred/.nvm/versions/node/v14.4.0/bin/node" "/home/fred/Wavynn/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/fred/Wavynn/node_modules/@discordjs/opus
node-pre-gyp ERR! node -v v14.4.0
node-pre-gyp ERR! node-pre-gyp -v v0.1.0
node-pre-gyp ERR! not ok 
Failed to execute '/home/fred/.nvm/versions/node/v14.4.0/bin/node /home/fred/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/fred/Wavynn/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31/opus.node --module_name=opus --module_path=/home/fred/Wavynn/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.31 --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @discordjs/opus@0.3.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/fred/.npm/_logs/2020-10-25T15_34_16_816Z-debug.log

Further details:

  • @discordjs/opus version:
  • Node.js version: v14.4.0
  • Operating system: WSL - Linux
  • Priority this issue should have – please be realistic and elaborate if possible: I can wait, might be an issue on my side, if WSL 1 isn't supported

Not building on mac 10.15.4

Trying to install as of the time of this issue. Was working with 0.2.1.
Getting messages of missing build:

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.1/opus-v0.3.1-node-v64-napi-v3-darwin-x64-unknown-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)

which then leads to a build, but this seems to lead to:

Error: Cannot find module 'node-pre-gyp'

and after installing this, results in:

Error: Cannot find module @discordjs/opus/prebuild/node-v64-napi-v3-darwin-x64-unknown-{libc_version}/opus.node

Rolling back to 0.2.1 works.

does not work on VPS

I install the package on my windows computer and my music bot plays perfectly, I install the package on my windows VPS and the bot leaves the music channel as soon as it enters

exports.run = async (bot, message, args, prefix) => {
    if (!message.member.voice.channel) return message.channel.send(`${bot.emotes.error} - Você não está em um canal de voz !`);

    if (!args[0]) return message.channel.send(`${bot.emotes.error} - Indique o título de uma música !`);

    bot.player.play(message, args.join(" "));
    message.react(`▶️`)
}
exports.help = {
    name: 'play',
    aliases: ['p'],
    category: 'music'
}

Further details:

  • @discordjs/opus version: 0.3.3
  • Node.js version: v14.15.3
  • Operating system: Windows
  • urgent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.