Hi, just experimenting with compose web using late...
# compose-web
s
Hi, just experimenting with compose web using latest Kotlin 2.0.20-RC and it’s throwing the following error for a sample app
Copy code
Uncaught runtime errors:
×
ERROR
Function 'ComposeViewport' can not be called: No function found for symbol 'androidx.compose.ui.window/ComposeViewport|ComposeViewport(org.w3c.dom.Element;kotlin.Function0<kotlin.Unit>){}[0]'
Error
    at kotlin.captureStackTrace (<http://localhost:8080/cmp.js:2:302708>)
    at <http://localhost:8080/kotlin-mpp-playground-compose-cmp-wasm-js.wasm:wasm-function[943]:0x4ad97>
Any idea what’s happening here?
It’s a multimodule app and no issue with the build.
k
Do you have a Compose build that officially supports that Kotlin version?
s
@Kirill Grouchnikov thanks for the reply… I thought with new compose compiler, things are decoupled. By the way, it’s working fine on JVM target (desktop) and no issue with the build.
o
Does the same project work with 2.0.10? What CM version do you use? From the error, it looks like the compose compiler plugin was not applied to the module where you call ComposeViewport, or the plugin did not work correctly.
s
it looks like the compose compiler plugin was not applied to the module
@Oleksandr Karpovich [JB] thanks..that was the issue..somehow i had
targetKotlinPlatforms = setOf(KotlinPlatformType.jvm)
in the build config. Removed it and is working fine now with 2.0.20-RC
👍 1