Skip to content

Imageviewer build failed (Js Wasm) #4953

Closed
@issamux

Description

@issamux

Description of the Bug
imageviewer JsWasm build fail with error Unresolved reference 'JsModule'

Affected platforms

  • Web (K/Wasm)
  • Web (Js/Wasm)

Versions
Last main code base.
kotlin.version= 2.0.0
agp.version= 8.0.2
compose.version= 1.6.10

To Reproduce
Steps to reproduce the behaviour:

  1. git checkout last main code source
  2. Build project
  3. See error

But when running

./gradlew wasmJsBrowserRun -t

the webpage started and everything is working !!

Possible related issue

https://youtrack.jetbrains.com/issue/KT-56025
https://youtrack.jetbrains.com/issue/KT-51942

Additional Error log

compose-multiplatform/examples/imageviewer/shared/src/jsWasmMain/kotlin/example/imageviewer/utils/uuid.kt:3:2 Unresolved reference 'JsModule'.

Task failed with an exception.

  • What went wrong:
    A problem was found with the configuration of task ':webApp:wasmJsProductionExecutableCompileSync' (type 'DefaultIncrementalSyncTask').
    • Gradle detected a problem with the following location: '/workspace/kmm/compose-multiplatform/examples/imageviewer/build/js/packages/imageviewer/kotlin'.

      Reason: Task ':webApp:jsBrowserProductionWebpack' uses this output of task ':webApp: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 ':webApp:wasmJsProductionExecutableCompileSync' as an input of ':webApp:jsBrowserProductionWebpack'.
      2. Declare an explicit dependency on ':webApp:wasmJsProductionExecutableCompileSync' from ':webApp:jsBrowserProductionWebpack' using Task#dependsOn.
      3. Declare an explicit dependency on ':webApp:wasmJsProductionExecutableCompileSync' from ':webApp:jsBrowserProductionWebpack' using Task#mustRunAfter.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingexamplesExample applicationsweb

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions