I'm getting the following warning, and I think thi...
# javascript
j
I'm getting the following warning, and I think this is a bug of the Kotlin/JS tooling:
There are multiple versions of "ktor-ktor-client-core-js-legacy" used in nodejs build: 1.6.8, 2.0.0. Only latest version will be used.
I have 2 independent multiplatform submodules to support Ktor 1 and Ktor 2. They are never used together. When running js tests for the module using Ktor 1.6.8, I have runtime errors because it is in fact using Ktor 2 during tests. I noticed the
build/js/packages/<module-name>/package.json
doesn't contain any dependencies, and in fact all dependencies of all subprojects are mixed together in
build/js/package.json
as "workspaces", excluding collisions (so Ktor 1 is not there). Is this normal? Is there a way to change that?
Given the structure of
build/js/packages
and the absence of dependencies in the corresponding
package.json
for each subproject/sourceset, I'm assuming a similar problem happens with multiple source sets that have different sets of dependencies. This is a big problem as well for me 😕
FYI I'm compiling with
BOTH
backends, but I reproduce with legacy (alone) as well. Didn't try with IR alone, but I'm assuming it's the same thing.
j
I spent about 20min looking for an issue... Thanks a lot!