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

bug(node): unable to load bindings for node-rdkafka #20936

Closed
rgbkrk opened this issue Oct 18, 2023 · 1 comment · Fixed by #24727
Closed

bug(node): unable to load bindings for node-rdkafka #20936

rgbkrk opened this issue Oct 18, 2023 · 1 comment · Fixed by #24727

Comments

@rgbkrk
Copy link
Contributor

rgbkrk commented Oct 18, 2023

The node library node-rdkafka fails to load in Deno 1.37.0+.

import Kafka from "npm:node-rdkafka"

On both Linux and Mac the bindings file cannot be found:

Stack trace:
Error: Could not locate the bindings file. Tried:
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/build/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/build/Debug/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/build/Release/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/out/Debug/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/Debug/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/out/Release/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/Release/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/build/default/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/compiled/18.17.1/linux/x64/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/addon-build/release/install-root/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/addon-build/debug/install-root/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/addon-build/default/install-root/node-librdkafka.node
 → /srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/lib/binding/node-v108-linux-x64/node-librdkafka.node
    at bindings (file:///srv/noteable/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/bindings.js:126:9)
    at Object.<anonymous> (file:///srv/noteable/.cache/deno/npm/registry.npmjs.org/node-rdkafka/2.17.0/librdkafka.js:10:32)
    at Object.<anonymous> (file:///srv/noteable/.cache/deno/npm/registry.npmjs.org/node-rdkafka/2.17.0/librdkafka.js:14:4)
    at Module._compile (node:module:733:34)
    at Object.Module._extensions..js (node:module:747:10)
    at Module.load (node:module:658:32)
    at Function.Module._load (node:module:539:12)
    at Module.require (node:module:677:19)
    at require (node:module:791:16)
    at Object.<anonymous> (file:///srv/noteable/.cache/deno/npm/registry.npmjs.org/node-rdkafka/2.17.0/lib/client.js:14:13)
@rgbkrk rgbkrk changed the title bug(node): unable to load node-rdkafka bug(node): unable to load bindings for node-rdkafka Oct 18, 2023
@AstralBaby
Copy link

Have you fixed it yet? facing the same issue on macos sonoma and debian

dsherret pushed a commit that referenced this issue Jul 26, 2024
Adds support for `npm:bindings` and `npm:callsites` packages because of
changes in
denoland/deno_core#838.

This `deno_core` bump causes us to stop prepending `file://` scheme for
locations
in stack traces that are for local files.

Fixes #24462 , fixes
#22671 , fixes
#15717 , fixes
#19130 , fixes
WiseLibs/better-sqlite3#1205 , fixes
WiseLibs/better-sqlite3#1034 , fixes
#20936

---------

Co-authored-by: Nathan Whitaker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants