Hello,
I have a Kotlin/JS project only (not multiplatform) where I import the library like this:
Copy code
plugins {
kotlin("js") version "1.5.10"
}
repositories {
mavenCentral()
}
kotlin {
js(IR) {
binaries.executable()
browser()
}
sourceSets {
val main by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.1")
}
}
}
}
But when I try to compile, I get this error
Copy code
> Task :compileKotlinJs FAILED
e: java.lang.AssertionError: Built-in class kotlin.Unit is not found
How should I import this?
Thanks for your help.
Tristan
12/15/2021, 7:03 PM
It works if I remove IR
r
russhwolf
12/15/2021, 7:18 PM
Maybe try bumping Kotlin version to 1.5.3x or 1.6.0. Right now the app is being built with an older Kotlin version than the library is, which isn't always compatible.