Skip to content

wasmJs artifact missing from Maven Central — Unresolved reference 'ismoy' when compiling for wasmJs target #128

@pavlo-kravchenko

Description

@pavlo-kravchenko

When using imagepickerkmp in a Kotlin Multiplatform project that includes a wasmJs target, compilation fails with Unresolved reference 'ismoy' errors for all classes from the library (rememberImagePickerKMP, ImagePickerKMPConfig, GalleryConfig, ImagePickerResult, PhotoResult).

The library is declared in commonMain.dependencies, which works correctly for Android, iOS, and Desktop targets. However, the wasmJs target fails to compile because the imagepickerkmp-wasm-js artifact does not appear to be published to Maven Central.

The README and release notes (including 1.0.35) advertise WASM support, but only the following artifacts are available on Maven Central:

  • imagepickerkmp-android
  • imagepickerkmp-iosarm64
  • imagepickerkmp-iossimulatorarm64
  • imagepickerkmp-js
  • imagepickerkmp-jvm

There is no imagepickerkmp-wasm-js artifact published.

Steps to Reproduce

  1. Create a KMP project with wasmJs { browser(); binaries.executable() } target
  2. Add implementation("io.github.ismoy:imagepickerkmp:1.0.41") to commonMain.dependencies
  3. Use any class from the library (e.g. rememberImagePickerKMP)
  4. Run ./gradlew :composeApp:wasmJsBrowserDistribution

Error

e: Unresolved reference 'ismoy'.
e: Unresolved reference 'rememberImagePickerKMP'.
e: Unresolved reference 'ImagePickerKMPConfig'.
e: Unresolved reference 'GalleryConfig'.
e: Unresolved reference 'ImagePickerResult'.
e: Unresolved reference 'PhotoResult'.

Environment

  • Library version: 1.0.41
  • Kotlin: 2.3.20
  • Compose Multiplatform: latest
  • Targets: Android, iOS, wasmJs

Expected Behavior

The imagepickerkmp-wasm-js artifact is published to Maven Central so that wasmJs target can resolve the library from commonMain.

Workaround

Currently the only workaround is to move all usages of the library out of commonMain into platform-specific source sets using expect/actual, with a stub implementation for wasmJsMain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions