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

**URL:** <https://discuss.kotlinlang.org/t/internal-compiler-error-when-compiling-to-js-under-kotlin-1-5-30/22929>\
**Category:** Support\
**Created:** [September 13, 2021, 5:59am UTC](https://discuss.kotlinlang.org/t/internal-compiler-error-when-compiling-to-js-under-kotlin-1-5-30/22929 "2021-09-13T05:59:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NightEule5](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@NightEule5](https://discuss.kotlinlang.org/u/NightEule5)\
**Post date:** [September 13, 2021, 5:59am UTC](https://discuss.kotlinlang.org/t/internal-compiler-error-when-compiling-to-js-under-kotlin-1-5-30/22929/1 "2021-09-13T05:59:04Z")

</div>

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:

```kotlin
js(IR) {
	nodejs()

	useCommonJs()
			
	binaries.library()
}

```

The full compiler log is [here](https://gist.github.com/NightEule5/60119e22c3fdb6e7f369c846feac4ce3)

---

<div class="post-metadata">

**Author:** ![Alexey.Belkov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/alexey.belkov/32/5215_2.png) [@Alexey.Belkov](https://discuss.kotlinlang.org/u/Alexey.Belkov)\
**Post date:** [September 13, 2021, 7:55am UTC](https://discuss.kotlinlang.org/t/internal-compiler-error-when-compiling-to-js-under-kotlin-1-5-30/22929/2 "2021-09-13T07:55:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NightEule5](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@NightEule5](https://discuss.kotlinlang.org/u/NightEule5)\
**Post date:** [September 13, 2021, 6:18pm UTC](https://discuss.kotlinlang.org/t/internal-compiler-error-when-compiling-to-js-under-kotlin-1-5-30/22929/3 "2021-09-13T18:18:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ananyagupta](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@ananyagupta](https://discuss.kotlinlang.org/u/ananyagupta)\
**Post date:** [September 21, 2021, 11:46am UTC](https://discuss.kotlinlang.org/t/internal-compiler-error-when-compiling-to-js-under-kotlin-1-5-30/22929/4 "2021-09-21T11:46:46Z")

</div>

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