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
- Create a KMP project with
wasmJs { browser(); binaries.executable() } target
- Add
implementation("io.github.ismoy:imagepickerkmp:1.0.41") to commonMain.dependencies
- Use any class from the library (e.g.
rememberImagePickerKMP)
- 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.
When using
imagepickerkmpin a Kotlin Multiplatform project that includes awasmJstarget, compilation fails withUnresolved 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, thewasmJstarget fails to compile because theimagepickerkmp-wasm-jsartifact 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-androidimagepickerkmp-iosarm64imagepickerkmp-iossimulatorarm64imagepickerkmp-jsimagepickerkmp-jvmThere is no
imagepickerkmp-wasm-jsartifact published.Steps to Reproduce
wasmJs { browser(); binaries.executable() }targetimplementation("io.github.ismoy:imagepickerkmp:1.0.41")tocommonMain.dependenciesrememberImagePickerKMP)./gradlew :composeApp:wasmJsBrowserDistributionError
Environment
1.0.412.3.20Expected Behavior
The
imagepickerkmp-wasm-jsartifact is published to Maven Central so thatwasmJstarget can resolve the library fromcommonMain.Workaround
Currently the only workaround is to move all usages of the library out of
commonMaininto platform-specific source sets usingexpect/actual, with a stub implementation forwasmJsMain.