https://kotlinlang.org logo
#javascript
Title
# javascript
c

Császár Ákos

03/15/2024, 11:54 AM
Hi! I am having problems with transitive dependencies. I am trying to add
kotlinx.datetime
with
@js-joda/timezone
and then to run
jsBrowserProductionWebpack
. Every time I need to add
"@js-joda/core": "3.2.0"
as dependency to the generated
package.json
file, otherwise I will get an error
(Module not found: Error: Can't resolve '@js-joda/core'
) in the project where I imported the library. Is there any way to make that dependency visible for the client application?
e

Edoardo Luppi

03/15/2024, 12:08 PM
https://github.com/Kotlin/kotlinx-datetime/blob/cc8121a6f677125f2cbaa0537efd60fa6a14ce2e/core/build.gradle.kts#L196 The problem imo is the npm dependency is specified in a custom source set and isn't propagated correctly to your
jsMain
c

Császár Ákos

03/15/2024, 12:14 PM
I see. Thank you!
e

Edoardo Luppi

03/15/2024, 12:15 PM
Tho it's just a guess. But it doesn't sound unlikely. You can try with a fork published to Maven Local