Skip to content

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

Closed
@aryamohanan

Description

@aryamohanan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions