For some reason my wasm app started throwing ```Mo...
# compose-web
m
For some reason my wasm app started throwing
Copy code
Module not found: Error: Can't resolve './skiko.mjs' in '/path/build/wasm/packages/project-name/kotlin'
but it worked fine a few days ago, any ideas what could be causing this? The only things that really come to mind are that I've added Coil3 and Skydoves ColorPicker
i
My guess is the dependency bumped Compose implicitly and now runtime and Gradle plugin versions do not match. Try to inspect it via "dependencies" gradle task. And update Compose most probably
m
I'm already on latest kotlin, compose, compose compiler, etc.
unless a dependency is downgrading it
i
CMP-8235 No skiko.mjs in tests for js and wasmJs targets сс @[JB] Shagen
m
It should be noted that unlike in the link you sent, mine are happening both in browserDevelopmentRun and browserDistribution
i
Shagen is the right person to talk about it. Let's wait his response
m
How much longer do you think it'll take until we get a response?
i
cc @Oleksandr Karpovich [JB]
o
does the app work on earlier commits before you added new libraries? do you use the latest versions of the libraries? which cmp version btw?
m
CMP 1.9.0 Kotlin 2.2.20 I'm not 100% sure if it worked before since I mainly ran stuff on a desktop target, but I believe at some point it did For now I'm just adding the files from packages_imported/skiko-js-wasm-runtime to packages/[project name] every rebuild
j
I also have this problem, although I'll admit I've spent zero time looking into it.
Hope to sometime this week
Offending PR https://github.com/cashapp/redwood/pull/2819 Offending module is https://github.com/cashapp/redwood/tree/trunk/redwood-widget-composeui CI is running
jsTest
task, and the failing task is then
:redwood-widget-composeui:jsNodeTest
.
Only if you want to peek. I'm sure I can isolate the problem on my own it just hasn't bubbled to the top of the pile yet!
o
Folks, do you apply the compose multiplatform gradle plugin in your projects? Our gradle plugin is responsible for adding skiko.mjs https://github.com/JetBrains/compose-multiplatform/blob/17921abbd6bc8150e80f360168[…]n/org/jetbrains/compose/web/internal/configureWebApplication.kt - or do you disable the responsible task for some reason?
m
I apply kotlin("plugin.compose") and id("org.jetbrains.compose") If anything's missing I'd love to hear it, but
./gradlew processSkikoRuntimeForKWasm
throws with
Task 'processSkikoRuntimeForKWasm' not found in root project 'XYZ'.
Is it possible the plugin by default only applies to JS-IR targets, and ignores WASMJS targets?
j
I do not use the Compose Multiplatform plugin. This module is a fairly small library.
o
Task 'processSkikoRuntimeForKWasm' not found in root project 'XYZ'
Can you try it on a module with compose plugin applied? e.g. ./gradlew composeAppprocessSkikoRuntimeForKWasm Do you have an explicit dependency on
org.jetbrains.compose.ui:ui
with latest CMP version? It could be that you have a transitive dependency but older version, which is not compatible anymore.
I do not use the Compose Multiplatform plugin. This module is a fairly small library.
Hmm. And it used to work before the update without the plugin?
m
Can you try it on a module with compose plugin applied? e.g. ./gradlew composeAppprocessSkikoRuntimeForKWasm
This was in a project with the plugin applied, and there is an explicit dependency on
compose.ui
(where compose is the plugin-provided instance of
org.jetbrains.compose.ComposePlugin.Dependencies
) in the commonMain dependencies.
o
@martmists is it possible for you to share the project? Also when reporting in YouTrack , you can upload your project at https://uploads.jetbrains.com/ and share the upload ID - so your project doesn't have to be public. I understand if you prefer to not share it anyway