did you import kafka?
# multiplatform
d
did you import kafka?
p
How can I import kafka from kafkajs in Kotlin?
d
idk, but it liooks like that might be the issues
p
Copy code
I solved the issue with that implementation: 

// declarations
@JsModule("kafkajs")
external object kafka {
    fun consumer(options: ConsumerOptions): dynamic
}

external interface ConsumerOptions {
    var groupID: String
}

// code
fun createConsumer(): dynamic {
val options: ConsumerOptions = js("({})")
options.groupID = "test-group"
return kafka.consumer(options)
}
Now I get the next error: TypeError: $module$kafkajs.consumer is not a function