Hi, is there anyone else having isses with the abs...
# multiplatform
o
Hi, is there anyone else having isses with the absolute paths in the npm packages creaeted by kotlin 1.4.* when it comes to consuming them in a “real” nodejs project? https://discuss.kotlinlang.org/t/local-dependencies-in-package-json-of-js-mpp-projects/19260
👀 1
@Artyom Degtyarev [JB] what do you think? 🙂
a
I’m not so familiar with this area. @Ivan Kubyshkin [JetBrains], could you please take a look?
🙏 1
i
cc @Ilya Goncharov [JB]
i
You can use
publicPackageJson
task for create
package.json
without Kotlin dependencies, but only with external NPM dependencies The problem with using Kotlin modules as NPM independent modules is that in process of installing dependencies with NPM, you can get multiple versions of Kotlin modules, and all of them will be accessible in runtime. It leads to problems with class casts and type checks. The main idea, that all Kotlin modules can be bundled together (via webpack for example) and then with
publicPackageJson
can be published into NPM
o
Yes thats’s fine and I can understand that. 🙂 However, if I have two modules, lets say A and B where B depends on A. I expect “B’s publicJson to contain a depedency to A. @Ilya Goncharov [JB] Or am I missing something?
I think I found an issue describing the same question we have. https://youtrack.jetbrains.com/issue/KT-44740
@Ivan Kubyshkin [JetBrains]
🙏 1