compose-jb-routing icon indicating copy to clipboard operation
compose-jb-routing copied to clipboard

TypeError: this.route$composable is not a function

Open DVDAndroid opened this issue 2 years ago • 0 comments

I have created a empty project using Intellij project wizard, updated deps

kotlin("multiplatform") version "1.6.10"
id("org.jetbrains.compose") version "1.0.1"

main.kt

fun main() {
  renderComposable(rootElementId = "root") {
    Router {
      initRouting("/")
      route("/") { Text("home") }
      route("/test") { Text("test") }
    }
  }
}

This occurs in browser (chrome)

Uncaught TypeError: this.route$composable_n6d7bi_k$ is not a function	components.kt?b101:30
 at _no_name_provided__217.RouterScope.route$composable$default_onzyoe_k$ (webpack-internal:///./kotlin/testprojectrouting.js:70587:36)
    at _no_name_provided__221.invoke_9m2agf_k$ (webpack-internal:///./kotlin/testprojectrouting.js:70710:30)
    at eval (webpack-internal:///./kotlin/testprojectrouting.js:70816:9)
    at ComposableLambdaImpl.invoke_oku154_k$ (webpack-internal:///./kotlin/testprojectrouting.js:66220:92)
    at _no_name_provided__198.invoke_5vwf3d_k$ (webpack-internal:///./kotlin/testprojectrouting.js:67073:44)
    at eval (webpack-internal:///./kotlin/testprojectrouting.js:67148:9)
    at ComposableLambdaImpl.invoke_uhotyh_k$ (webpack-internal:///./kotlin/testprojectrouting.js:66204:92)
    at invokeComposable$composable (webpack-internal:///./kotlin/testprojectrouting.js:65588:15)
    at _no_name_provided__122.invoke_sv8swh_k$ (webpack-internal:///./kotlin/testprojectrouting.js:43303:7)
    at eval (webpack-internal:///./kotlin/testprojectrouting.js:45321:9)

Tested with compose 1.0.1 and 1.1.0-alpha05 and webpack 4 and 5

DVDAndroid avatar Feb 19 '22 11:02 DVDAndroid