Skip to content

Bug: TypeError in node-rdkafka v3.3.0 with Node.js v23 #1117

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

Closed
aryamohanan opened this issue Feb 19, 2025 · 2 comments
Closed

Bug: TypeError in node-rdkafka v3.3.0 with Node.js v23 #1117

aryamohanan opened this issue Feb 19, 2025 · 2 comments

Comments

@aryamohanan
Copy link
Contributor

Environment Information

  • OS: macOS (M1 architecture)
  • Node.js Version: v23
  • NPM Version: 10.9.0
  • node-rdkafka Version: 3.3.0

Steps to Reproduce

  1. Upgrade node-rdkafka to version 3.3.0
  2. Run the application with Node.js v23
  3. The following error occurs:

Error Log

/artifacts/node_modules/node-rdkafka/lib/error.js:408
  } else if (!util.isError(e)) {
                ^
TypeError: util.isError is not a function
    at new LibrdKafkaError (/artifacts/node_modules/node-rdkafka/lib/error.js:408:20)
    at Function.createLibrdkafkaError [as create] (/artifacts/node_modules/node-rdkafka/lib/error.js:456:10)
    at /artifacts/node_modules/node-rdkafka/lib/kafka-consumer.js:510:29

Expected Behavior

The library should work without issues after upgrading to v3.3.0 in Node.js v23.

Actual Behavior

The application crashes at runtime due to TypeError: util.isError is not a function.

Additional Context

This issue seems to be caused by util.isError() was deprecated and removed in v23, see nodejs/node@dc379626ab

@aryamohanan
Copy link
Contributor Author

Created a PR to fix this issue #1119

@aryamohanan
Copy link
Contributor Author

The issue resolved in v3.3.1 https://github.com/Blizzard/node-rdkafka/releases

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