JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.86k stars 1.15k forks source link

web: Error loading module 'cms'. Its dependency 'androidx-runtime' was not found. #3345

Open eymar opened 1 year ago

eymar commented 1 year ago

Describe the bug https://kotlinlang.slack.com/archives/C01F2HV7868/p1689140024804609

Uncaught Error: Error loading module 'cms'. Its dependency 'androidx-runtime' was not found. Please, check whether 'androidx-runtime' is loaded prior to 'cms'.
    at cms.js:8:13
    at cms.js:21:2

Affected platforms Select one of the platforms below:

Versions

To Reproduce see https://kotlinlang.slack.com/archives/C01F2HV7868/p1689140024804609

Additional context

Workaround:

Update the build.gradle.kts, by adding commonWebpackConfig { outputFileName = ... }

js(IR) {
        moduleName = "cms"
        browser {
            commonWebpackConfig {
                outputFileName = "cms.js"
            }
        }
        binaries.executable()
    }

TODO: create a reproducer without compose and report to k/js team.

ZacSweers commented 8 months ago

Hello! I filed a similar issue (that reproduces a problem described earlier in the linked slack thread) here: https://github.com/Kotlin/kotlinx-datetime/issues/334

ZacSweers commented 8 months ago

A similar issue was filed and marked as fixed in 1.8 here, but seems to be regressed: https://youtrack.jetbrains.com/issue/KT-45789

okushnikov commented 1 week ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.