https://kotlinlang.org logo
#compiler
Title
# compiler
a

andylamax

10/19/2023, 9:45 AM
Not sure if this fits here but let me try. When I import a javascript library built by kotlin/js in the browser, I get the following error
Copy code
Uncaught TypeError: context.xe is not a function
    at CombinedContext.plus2 [as ye] (kotlin-kotlin-stdlib.js:254:21)
    at ktor-ktor-client-core.js:1547:33
    at protoOf2.v2 (kotlin-kotlin-stdlib.js:12322:42)
    at protoOf.j1r (ktor-ktor-client-core.js:1566:19)
    at HttpClient (ktor-ktor-client-core.js:545:33)
    at HttpClient_init_$Init$ (ktor-ktor-client-core.js:330:16)
    at HttpClient_init_$Create$ (ktor-ktor-client-core.js:335:12)
    at HttpClient_0 (ktor-ktor-client-core.js:629:18)
    at HttpClient_1 (ktor-ktor-client-core.js:5454:12)
    at Object.api (picapital-api-flix.js:168:16)
This does not happen in node at all. I tried building with and without
useCommonJs()
, but seemed to come to the same error. I have tried with kotlin 1.9.0, 1.9.10, 1.9.20-RC. More context in the thread
The error seems to stem from the kotlin-stdlib itself about an operator plus function