I'm currently trying out coroutines for my kotlin-js project on node.js.
I'm using IntelliJ-Idea and kotlin plugin 1.2.40
Coroutines should be supported, are they? But the "launch"-coroutine is not found by the IDE?!
On the other hand the namespace kotlin.coroutines.experimental is found and i can use for example the suspendCoroutine function but not much else what should actually be available for coroutines.
launchas well asasyncand all the other stuff you use directly is inkotlinx.coroutines, which is not a part of the standard library. The standard library only contains the low-level primitives likesuspendCoroutinethat you mention.So you must add a dependency to
org.jetbrains.kotlinx:kotlinx-coroutines-core.