Skip to content

KMP JS build failure: No matching JS variant for compose-stability-runtime:0.5.3 #61

@pushpalroy

Description

@pushpalroy

Project information:

  • Library Version: 0.5.3
  • Affected Target(s): Kotlin Multiplatform project with JS target (IR + npm / browser) running in GitHub Actions CI on ubuntu-latest

Describe the Bug:

Using the stability analyzer plugin inside a Kotlin Multiplatform shared module that targets Android, iOS, Desktop, and JS causes the build to fail during the :kotlinNpmInstall step. The JS resolution fails because Gradle cannot locate a matching variant of the dependency com.github.skydoves:compose-stability-runtime:0.5.3.

Could not determine the dependencies of task ':kotlinNpmInstall'.
> Failed to query the value of task ':kotlinNpmInstall' property 'packageJsonFiles'.
   > Could not resolve all dependencies for configuration ':jetlime:jsNpmAggregated'.
      > Could not resolve com.github.skydoves:compose-stability-runtime:0.5.3.
        Required by:
            project :jetlime
         > No matching variant of com.github.skydoves:compose-stability-runtime:0.5.3 was found. 
           The consumer was configured to find a library for use during 'kotlin-runtime',
           optimized for non-jvm, with attributes for JS IR + public package.json (npm),
           but no compatible variant exists.

This issue occurs specifically when building in GitHub Actions CI, and prevents building KMP libraries with JavaScript targets.

Expected Behavior:

The plugin should either:

  • Provide a JS-compatible artifact (or wasm-js compatible if intended), or
  • Automatically skip / allow disabling on unsupported targets (e.g., js {} target in KMP)

so that the build completes successfully without failing the kotlinNpmInstall.
Until a JS variant is available, KMP consumers should be able to opt out per target without breaking CI builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions