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

Confluent Kafka JavaScript should not extend Promise for maximum compatibility #149

Open
jesse-w1 opened this issue Nov 7, 2024 · 0 comments

Comments

@jesse-w1
Copy link

jesse-w1 commented Nov 7, 2024

Environment Information

  • OS: Ubuntu 22.04.5 LTS
  • Node Version: 20.18.0
  • NPM Version: 10.8.2
  • C++ Toolchain: g++
  • confluent-kafka-javascript version: 0.4.0

Steps to Reproduce

Use Bluebird promises in your application.

global.Promise = require('bluebird');

Then you will receive the following error:

ERROR: TypeError: the promise constructor cannot be invoked directly

    See http://goo.gl/MqrFmX

    at check (<OMIT>/node_modules/bluebird/js/release/promise.js:86:15)
    at new Promise (<OMIT>/node_modules/bluebird/js/release/promise.js:96:9)
    at new DeferredPromise (/app/node_modules/@confluentinc/kafka-javascript/lib/kafkajs/_common.js:647:5)

confluent-kafka-javascript Configuration Settings

Additional context

Unfortunately, we have an older NodeJS application which heavily uses Bluebird promises. I'm not sure whether porting it to use native promises will happen anytime soon.

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

No branches or pull requests

1 participant