Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: this.route$composable is not a function #2

Open
DVDAndroid opened this issue Feb 19, 2022 · 0 comments
Open

TypeError: this.route$composable is not a function #2

DVDAndroid opened this issue Feb 19, 2022 · 0 comments

Comments

@DVDAndroid
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant