You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ bun run index.ts
107 | return opts[p] || p;
108 | })
109 | );
110 | tries.push(n);
111 | try {
112 | b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
^
error: The module 'kafka' was compiled against a different Node.js ABI version using NODE_MODULE_VERSION 108. This version of Bun requires NODE_MODULE_VERSION 127. Please try re-compiling or re-installing the module.
at bindings (/Users/arcoraven/bun-example/node_modules/bindings/bindings.js:112:48)
at <anonymous> (/Users/arcoraven/bun-example/node_modules/@confluentinc/kafka-javascript/librdkafka.js:10:5)
at <anonymous> (/Users/arcoraven/bun-example/node_modules/@confluentinc/kafka-javascript/lib/client.js:15:5)
at <anonymous> (/Users/arcoraven/bun-example/node_modules/@confluentinc/kafka-javascript/lib/kafka-consumer.js:14:5)
at <anonymous> (/Users/arcoraven/bun-example/node_modules/@confluentinc/kafka-javascript/lib/rdkafka.js:11:5)
at <anonymous> (/Users/arcoraven/bun-example/node_modules/@confluentinc/kafka-javascript/lib/kafkajs/_producer.js:1:7)
at <anonymous> (/Users/arcoraven/bun-example/node_modules/@confluentinc/kafka-javascript/lib/kafkajs/_kafka.js:1:19)
at <anonymous> (/Users/arcoraven/bun-example/node_modules/@confluentinc/kafka-javascript/lib/kafkajs/index.js:5:8)
at <anonymous> (/Users/arcoraven/bun-example/node_modules/@confluentinc/kafka-javascript/lib/index.js:1:5)
Bun v1.2.3 (macOS arm64)
Does this library depend on Node.js-specific APIs or V8 engine features that aren't yet implemented in Bun's runtime?
I get slightly different error
bun: symbol lookup error: node_modules/@confluentinc/kafka-javascript/build/Release/confluent-kafka-javascript.node: undefined symbol: _ZN2v816FunctionTemplate12SetClassNameENS_5LocalINS_6StringEEE
To get bun support, either they'll have to support all the nan functions we use (What @patrykwegrzyn has linked above), or else, we will need to transition to N-API which is better supported by bun (oven-sh/bun#158).
However, I think both these alternatives will need a fair bit of work testing and making sure everything works properly. So, at the moment, we don't support bun (or any runtime except node itself).
Environment Information
Steps to Reproduce
Trying to instantiate the KafkaJS client with the Bun runtime throws an error.
index.ts
:Running it with
bun run index.ts
:Does this library depend on Node.js-specific APIs or V8 engine features that aren't yet implemented in Bun's runtime?
confluent-kafka-javascript Configuration Settings
N/A
Additional context
package.json
:tsconfig.json
:The text was updated successfully, but these errors were encountered: