I created a module that contain design system of m...
# compose-web
a
I created a module that contain design system of my Kotlin multiplatform project. in desktop (JVM), it works well Meanwhile, when I try to add wasm to it, it doesn't work. Here my module build.gradle.kts file:
Copy code
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl

plugins {
    alias(libs.plugins.kotlinMultiplatform)
    alias(libs.plugins.jetbrainsCompose)
}

kotlin {

    jvm {
        compilations.all {
            kotlinOptions.jvmTarget = "17"
        }
    }

    @OptIn(ExperimentalWasmDsl::class)
    wasmJs {
        moduleName = "designsystem"
        browser {}
        binaries.library()
    }
    
    sourceSets {
        commonMain.dependencies {
            implementation(compose.runtime)
            implementation(compose.foundation)
            implementation(compose.material3)
            implementation(compose.ui)
            implementation(compose.materialIconsExtended)
            implementation(compose.components.resources)
        }

    }
}
I got this error: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':kotlinStoreYarnLock'.
yarn.lock was changed. Run the
kotlinUpgradeYarnLock
task to actualize yarn.lock file
* Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
BUILD FAILED in 22s Waiting for changes to input files... (ctrl-d to exit)
😞 1
a
Did you run kotlinUpgradeYarnLock ?
a
No, what does mean running kotlinUpgradeYarnLock ?
a
It’s a gradle task
Search for that in the gradle tab and execute it
🎉 1
a
Yay, It is fixed. Thank you so much 🔥 I run this in terminal: ./gradlew kotlinUpgradeYarnLock
🙌 1