Skip to content

Failed build when targeting wasmJs #275

Open
@andrea-liu87

Description

@andrea-liu87

Hello I had this error on my Compose Multiplatform project when add kotlin target wasmJs(WebAssembly)

Could not resolve dev.icerock.moko:mvvm-core:0.16.1.
Required by:
project :shared
> No matching variant of dev.icerock.moko:mvvm-core:0.16.1 was found. The consumer was configured to find a library for use during 'kotlin-runtime', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm', attribute 'org.jetbrains.kotlin.js.public.package.json' with value 'public-package-json', attribute 'org.jetbrains.kotlin.wasm.target' with value 'js' but:
- Variant 'debugApiElements-published' capability dev.icerock.moko:mvvm-core:0.16.1 declares a library:
- Incompatible because this component declares a component for use during compile-time, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
- Doesn't say anything about org.jetbrains.kotlin.js.public.package.json (required 'public-package-json')
- Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')

Activity

CSAbhiOnline

CSAbhiOnline commented on Apr 20, 2025

@CSAbhiOnline

April 20, 2025 and having the same issue

TheArchitect123

TheArchitect123 commented on May 26, 2025

@TheArchitect123

https://github.com/Ares-Defence-Labs/Atlas

@CSAbhiOnline @andrea-liu87

You can use mine.
Supports all platforms, and I'm continuously developing it.

I had to build my own SDK for KMP for my commercial projects since there was nothing available for KMP.

It has the following features:

  1. Compile time iOC + Dependency Injection
  2. Resource Generators for Images, Strings, Fonts, SVG Converter (converts to a PNG if set on gradle.properties file)
  3. Incremental Building for fast XCFramework generation
  4. Built In Navigation Engine, that gets auto generated based on Annotations (AtlasScreen) that you configure on your platform (supports Android Compose + UIKit)
  5. Full Support for Flows on CommonMain, including new extensions for Observing on MainThread.

You can find the full documentation here.
https://thearchitect123.github.io/ArtifactsDocProduction/develop/kotlin/multiplatform/atlas/

I'm adding more features as I go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @andrea-liu87@TheArchitect123@CSAbhiOnline

        Issue actions

          Failed build when targeting wasmJs · Issue #275 · icerockdev/moko-mvvm