Kotlin-Javascript stopped working


I just tried to resume work on a Kotlin-Javascript project after taking a break for a few weeks, and found that IDEA Community Edition no longer seems to support it. Symptoms are fairly random, depending on my attempts to fix it by reinstalling IDEA etc. At first, my previously working Build/Run configuration of Kotlin (Javascript) was marked as not supported. After reinstalling, “Kotlin (Javascript)” is available again, but doesn’t work. It either doesn’t generate a js file at all, or generates an empty one.

Auto-complete is also not working properly. Sometimes it pops up with something sensible (maybe only if it can make deductions based on the current file?), but at other times it doesn’t offer any suggestions at all.

It’s as if IDEA is lacking any sort of association that my src subdirectory contains the source code for my project, and any way of making that association.

Have Jetbrains quietly pulled the plug on Kotlin-JS, at least in the Community Edition, or is this a bug?


Kotlin/JS should definitely work in the Community edition. You wouldn’t be able to debug the resulting JS code in IDEA, nor will you get NodeJs integration, but other than that everything else should work absolutely identical (including auto-complete, compilation, MPP, etc.). AFAIK the only feature in the plugin, which requires the Ultimate edition is test launcher, because it depends on NodeJS plugin.

It sounds like something went serious wrong in your case. Could you share you IDEA and kotlin plugin version? Could you try creating a new project from scratch?


I got it working again by creating a new project and copying the source and .git files etc across from the old one. At first that didn’t work either, because java kept crashing when running the compiler, but there was an upgrade available in my distro (openjdk8 in Arch Linux) and that fixed it. Maybe whatever was bugged in the older JDK was what caused the problem in the first place, and whatever was in the “out” directory before stopped IDEA from showing the crash report.


The Kotlin plugin just got updated again and Kotlin2JS run/debug configurations have been disabled again. The build button works though, so at least the essentials still work. The run configuration had very restricted use in CE anyway, except for automatically copying the generated JS to a more convenient location, because of the lack of a built-in web server and the cross-host security restrictions on file://.