Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@discordjs/opus does not load #4711

Closed
twlite opened this issue Sep 9, 2023 · 4 comments
Closed

@discordjs/opus does not load #4711

twlite opened this issue Sep 9, 2023 · 4 comments
Labels
bug Something isn't working node.js Compatibility with Node.js APIs

Comments

@twlite
Copy link
Contributor

twlite commented Sep 9, 2023

What version of Bun is running?

1.0.0

What platform is your computer?

Darwin 22.5.0 arm64 arm

What steps can reproduce the bug?

import { OpusEncoder } from "@discordjs/opus";

console.log(OpusEncoder);

What is the expected behavior?

Running this on node, it outputs [Function: OpusEncoder].

What do you see instead?

283 |           platform: options.target_platform || process.platform,
284 |           target_platform: options.target_platform || process.platform,
285 |           arch: options.target_arch || process.arch,
286 |           target_arch: options.target_arch || process.arch,
287 |           libc: options.target_libc || detect_libc.familySync() || 'unknown',
288 |           libc_version: detect_libc.versionSync() || 'unknown',
                    ^
TypeError: detect_libc.versionSync is not a function. (In 'detect_libc.versionSync()', 'detect_libc.versionSync' is undefined)
      at /.../node_modules/@discordjs/node-pre-gyp/lib/util/versioning.js:288:16
      at /.../node_modules/@discordjs/node-pre-gyp/lib/pre-binding.js:30:14
      at /.../node_modules/@discordjs/opus/lib/index.js:5:25
      at globalThis (/.../node_modules/@discordjs/opus/lib/index.js:5:70)

Additional information

I believe this issue can be closed by PR #3534

@twlite twlite added the bug Something isn't working label Sep 9, 2023
@retrouser955
Copy link

Having the same issue as well.

@Electroid Electroid added the node.js Compatibility with Node.js APIs label Oct 27, 2023
@Electroid
Copy link
Contributor

New error as of Bun v1.0.7 is:

error: Cannot find module "node_modules/@discordjs/opus/prebuild/node-v115-napi-v3-darwin-arm64-unknown-unknown/opus.node" from "node_modules/@discordjs/opus/lib/index.js"

Which is a duplicate of #4959, so tracking the issue there.

@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
@Jarred-Sumner
Copy link
Collaborator

Fixed by @dylan-conway and @paperdave in #7132

This will be part of the Bun v1.0.17 release, which ships in a few hours from the time of writing.

@SkyLissh
Copy link

I'm haeing this issue, but the error that appears is error: Cannot find module "node_modules/@discordjs/opus/prebuild/node-v115-napi-v3-linux-x64-glibc-2.29/opus.node" from "node_modules/@discordjs/opus/lib/index."

This is happening with the Bun version 1.1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node.js Compatibility with Node.js APIs
Projects
None yet
Development

No branches or pull requests

5 participants