Hi all, has anyone faced this issue while trying ...
# multiplatform
i
Hi all, has anyone faced this issue while trying to add Ktor?
c
Ktor support for WASM is still in beta, and is expected to be available in Ktor 3.0. You should be ale to test it out now with EAP builds https://kotlinlang.slack.com/archives/C0A974TJ9/p1710759507801069
i
hi @Casey Brooks, thanks for this. I will give it a try. Also are there any alternatives to Ktor that can be used for integrating APIs that supports wasm
j
I just tried using version
3.0.0-wasm2
but keeping getting
Could not find io.ktor:ktor-client-core:3.0.0-wasm2.
@Ichchha if you get it working please do let me know
j
you need to add following (example of use in https://github.com/joreilly/ClimateTraceKMP)
Copy code
maven("<https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental>")
1
i
Thanks @John O'Reilly and @Casey Brooks, the error before is gone but when i run the project I am getting this error related to yarn. I dont think its directly related to ktor, but any of you have idead?
j
happens occasionally when using Kotlin/Js Wasm.....you need to run the gradle command mentioned
👍 1
i
Thanks, yeah it went after running the gradle command
@JPilson Sumbo, I was able to fix the issue. Thanks @Casey Brooks and @John O'Reilly. Here is the step by step guide on what you can do: https://medium.com/@ichchhamoktan07/adding-ktor-to-my-kotlin-multiplatform-project-for-web-web-assembly-or-wasm-4f6adad39b73
j
Yes I was able to solve by adding the repository
👍 1