<@U0BMF6PDJ> I encountered an error when trying to...
# webassembly
a
@bashor I encountered an error when trying to execute
:wasmJsBrowserDistribution
Copy code
> Task :composeApp:wasmJsBrowserDistribution
> Task :shared:compileProductionExecutableKotlinWasmJs UP-TO-DATE
> Task :shared:wasmJsProductionExecutableCompileSync
> Task :shared:wasmJsBrowserProductionExecutableDistributeResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':shared:wasmJsBrowserProductionExecutableDistributeResources' (type 'Copy').
  - Gradle detected a problem with the following location: '/Users/xxx/xxx/projectName/build/js/packages/composeApp/kotlin/composeApp.wasm'.
    
    Reason: Task ':shared:wasmJsBrowserProductionExecutableDistributeResources' uses this output of task ':composeApp:wasmJsProductionExecutableCompileSync' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':composeApp:wasmJsProductionExecutableCompileSync' as an input of ':shared:wasmJsBrowserProductionExecutableDistributeResources'.
      2. Declare an explicit dependency on ':composeApp:wasmJsProductionExecutableCompileSync' from ':shared:wasmJsBrowserProductionExecutableDistributeResources' using Task#dependsOn.
      3. Declare an explicit dependency on ':composeApp:wasmJsProductionExecutableCompileSync' from ':shared:wasmJsBrowserProductionExecutableDistributeResources' using Task#mustRunAfter.
I did this about 5 times before and there were no errors. However, when I manually added
Copy code
tasks.named<Copy>("wasmJsBrowserProductionExecutableDistributeResources") {
    dependsOn(":composeApp:wasmJsProductionExecutableCompileSync")
}
the problem disappeared. I didn’t find a specific issue so I decided let you know
🙏 1
a
@Ilya Goncharov [JB] ^^
🙏 1