Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imageviewer build failed (Js Wasm) #4953

Open
issamux opened this issue Jun 10, 2024 · 0 comments · May be fixed by #4956
Open

Imageviewer build failed (Js Wasm) #4953

issamux opened this issue Jun 10, 2024 · 0 comments · May be fixed by #4956
Assignees
Labels
bug Something isn't working examples Example applications web

Comments

@issamux
Copy link
Contributor

issamux commented Jun 10, 2024

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.
@issamux issamux added bug Something isn't working submitted labels Jun 10, 2024
@issamux issamux changed the title Imageviewer build failed Imageviewer build failed (Js Wasm) Jun 10, 2024
@issamux issamux linked a pull request Jun 11, 2024 that will close this issue
@Schahen Schahen self-assigned this Jun 13, 2024
@Schahen Schahen added web and removed submitted labels Jun 13, 2024
@MatkovIvan MatkovIvan added the examples Example applications label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working examples Example applications web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants