Been getting this Kotlin JS issue via Gradle: e: F...
# javascript
n
Been getting this Kotlin JS issue via Gradle: e: File '/home/napperley/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-js/1.1.50/94cb645045b500ffe1b7f1711567c9ebe3635100/kotlin-stdlib-js-1.1.50.jar' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.1.0, expected version is 1.0.1. What is binary version metadata? If Kotlin JS is downgraded to 1.1.4-3 then the issue doesn't appear. Have another Kotlin JS project using v1.1.50 which transpiles fine via Gradle which is strange. 😕
b
@napperley looks like you migrated to new version of stdlib but still using old compiler. Please check it.
Note, in 1.1.50 we’ve broken binary forward compatibility in Kotlin/JS. So, you should update your compiler to 1.1.50 or newer if you want to use libraries compiled with Kotlin/JS 1.1.50, but you can still use libraries compiled with older version of Kotlin compiler (even if you using compiler version 1.1.50 or newer). More information is here https://blog.jetbrains.com/kotlin/2017/09/kotlin-1-1-50-is-out/
n
How do I update the Kotlin JS compiler using Gradle Kotlin DSL?
b
kotlin
function has optional parameter for that:
Copy code
classpath(kotlin(“gradle-plugin”, “1.1.50"))
n
Already tried that. See the new issue on YouTrack: https://youtrack.jetbrains.com/issue/KT-20479