"Internal compiler error" when compiling to JS under Kotlin 1.5.30

I’m getting this exception when I compile a multiplatform project to JS with Kotlin 1.5.30:

java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.collections.CollectionsKt___CollectionsKt.joinToString, parameter $this$joinToString

It also fails on 1.5.10 and 1.5.20. I haven’t tested it on other versions.

The JS target in my build.gradle.kts looks like this:

js(IR) {


The full compiler log is here

This looks like a bug: https://youtrack.jetbrains.com/issue/KT-47088, please watch the issue for updates.

Ah, I see. I found what was triggering the bug in my project and it compiles fine. Thanks

I got your suggestion is working and i was able to remove bug.