Traverson with Kontlin/JS


I am having trouble getting Traverson to work within a Kotlin/JS frontend project.
I added the dependency in build.gradle.kts via:

implementation(npm("traverson", "7.0.1"))

Then I created Kotlin definition for traverson api:

external fun from(url: String): Builder

external class Builder {

    fun follow(vararg links: String): Builder
    fun getResource(callback: (err:dynamic, document:dynamic) -> Unit)


Then I used it in a simple test:

fun traversonRequest() {
        .getResource { _, document -> JSON.stringify(document) }

In traverson logs it seems to fail at executing the first request without any error:

[log] traverson/debug: creating new NegotiationAdapter
[log] traverson/debug: initiating traversal (getResource)
[log] traverson/debug: starting to follow links
[log] traverson/debug: processing next step
[log] traverson/debug: applying
[log] traverson/debug: next transform
[log] traverson/debug: fetching resource for next step
[log] traverson/debug: fetching resource from 
[log] traverson/debug: options
[log] traverson/debug: HTTP GET request to 
[log] traverson/debug: options 

Did anyone have similar issues? Or is there any obvious mistake in my approach?