compose-multiplatform
compose-multiplatform copied to clipboard
compile WasmJs FAILED
Describe the bug Encountered an compilation error when compiling a WASM/JS target
Affected platforms
- Web (K/Wasm) - Canvas based API
Versions kotlin.version=1.9.23 agp.version=8.1.1 compose.version=1.6.1 coroutines.version=1.8.0
Stacktrace
Task :sample:shared:compileDevelopmentExecutableKotlinWasmJs FAILED e: Module "org.jetbrains.compose.foundation:foundation" has a reference to symbol org.jetbrains.skiko/SkikoKey.platformKeyCode.<get-platformKeyCode>|<get-platformKeyCode>(){}[0]. Neither the module itself nor its dependencies contain such declaration.
This could happen if the required dependency is missing in the project. Or if there is a dependency of "org.jetbrains.compose.foundation:foundation" that has a different version in the project than the version that "org.jetbrains.compose.foundation:foundation" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.
The list of "org.jetbrains.compose.foundation:foundation" dependencies that may lead to conflicts:
- "kotlin" (a library with unknown version)
- "co.touchlab:kermit" (a library with unknown version)
- "co.touchlab:kermit-core" (a library with unknown version)
- "com.benasher44:uuid" (a library with unknown version)
- "components.resources:library" (a library with unknown version)
- "compose-webview-multiplatform.sample:shared" (a library with unknown version)
- "compose-webview-multiplatform:webview" (a library with unknown version)
- "org.jetbrains.androidx.core:core-bundle" (a library with unknown version)
- "org.jetbrains.androidx.lifecycle:lifecycle-common" (a library with unknown version)
- "org.jetbrains.androidx.lifecycle:lifecycle-runtime" (a library with unknown version)
- "org.jetbrains.androidx.lifecycle:lifecycle-runtime-compose" (a library with unknown version)
- "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel" (a library with unknown version)
- "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose" (a library with unknown version)
- "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-savedstate" (a library with unknown version)
- "org.jetbrains.androidx.navigation:navigation-common" (a library with unknown version)
- "org.jetbrains.androidx.navigation:navigation-compose" (a library with unknown version)
- "org.jetbrains.androidx.navigation:navigation-runtime" (a library with unknown version)
- "org.jetbrains.androidx.savedstate:savedstate" (a library with unknown version)
- "org.jetbrains.compose.animation:animation" (a library with unknown version)
- "org.jetbrains.compose.animation:animation-core" (a library with unknown version)
- "org.jetbrains.compose.annotation-internal:annotation" (a library with unknown version)
- "org.jetbrains.compose.collection-internal:collection" (a library with unknown version)
- "org.jetbrains.compose.foundation:foundation" (a dependency of the library with unknown version or versions mismatch: "org.jetbrains.compose.foundation:foundation")
- "org.jetbrains.compose.foundation:foundation-layout" (a library with unknown version)
- "org.jetbrains.compose.material:material" (a library with unknown version)
- "org.jetbrains.compose.material:material-icons-core" (a library with unknown version)
- "org.jetbrains.compose.material:material-ripple" (a library with unknown version)
- "org.jetbrains.compose.runtime:runtime" (a library with unknown version)
- "org.jetbrains.compose.runtime:runtime-saveable" (a library with unknown version)
- "org.jetbrains.compose.ui:ui" (a library with unknown version)
- "org.jetbrains.compose.ui:ui-geometry" (a library with unknown version)
- "org.jetbrains.compose.ui:ui-graphics" (a library with unknown version)
- "org.jetbrains.compose.ui:ui-text" (a library with unknown version)
- "org.jetbrains.compose.ui:ui-unit" (a library with unknown version)
- "org.jetbrains.compose.ui:ui-util" (a library with unknown version)
- "org.jetbrains.skiko:skiko" (a library with unknown version)
- "voyager:voyager-core" (a library with unknown version)
- "voyager:voyager-navigator" (a library with unknown version)
- "voyager:voyager-tab-navigator" (a library with unknown version)
- "org.jetbrains.kotlinx:atomicfu" (a library with unknown version)
- "org.jetbrains.kotlinx:kotlinx-coroutines-core" (a library with unknown version)
- "org.jetbrains.kotlinx:kotlinx-serialization-core" (a library with unknown version)
- "org.jetbrains.kotlinx:kotlinx-serialization-json" (a library with unknown version)
It seems like your project has a dependency on a library which depends on a newer skiko version, while your project depends on older skiko. Newer skiko doesn't have the missing symbol anymore - it's epxected.
Could you please try a new Compose Multiplatform version [1.6.10-rc01](https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.6.10-rc01)
?
Since you mentioned that you managed to make K/Wasm target work (here: https://github.com/JetBrains/compose-multiplatform/issues/4811), I close this issue.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.