Hi all, I have a multiplatform project with the js...
# javascript
w
Hi all, I have a multiplatform project with the js { browser { useCommonJS() } } target. Everything works, but now I'm trying to make it a library by changing the target to
Copy code
js("js", IR) {
    binaries.library()
    browser()
}
but i have this compilation error:
Copy code
Could not determine the dependencies of task ':shared:jsPackageJson'.
> Could not resolve all dependencies for configuration ':shared:jsNpm'.
   > Could not resolve co.touchlab:kermit:0.1.8.
     Required by:
         project :shared
      > No matching variant of co.touchlab:kermit:0.1.8 was found. The consumer was configured to find a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js', attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir' but:
          - Variant 'android-debugApiElements' capability co.touchlab:kermit:0.1.8:
              - Incompatible because this component declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
Does this mean the library is not compatible with the IR compiler? If that's the case, how can I know it beforehand or find the correct version?
b
You can use kamp.ml to check for ir compatibility.
No ir support unfortunately, only legacy
w
Ok, thanks! I need to find another library then :)
r
If we're not publishing IR in Kermit that's an oversight. Feel free to open an issue or PR
Should be a pretty quick fix
w
oh, ok! I'll have a look at it then