Hey all, going through some dependency hell. Is th...
# javascript
b
Hey all, going through some dependency hell. Is there any way to pin transitive depedencies or provide a yarn.lock? I'm using jsMain from a frontend web page
t
cc @Ilya Goncharov [JB]
b
Yeah, I saw one of their posts here. But it seems like the gradle task setup there is a bit dated and doesn't seem to work.
b
I'm looking through your example Björn, though when I run kotlinNpmInstall, the
build/yarn.lock
is empty. (Even though the copy is working correctly) And when I build, the
build/yarn.lock
is just the generated one and not my custom one. I guess I'm not quite sure exactly how this all works.
v
Well, do you have a
yarn.lock
file at the correct location, or did you use
updateYarnLock
to create or update it?
b
Yeah, I have one from last week in the project dir. When I run
copyYarnLock
it copies to the build dir correctly
Also, I'm still on 1.4.30. I don't know if that makes a difference.
v
That project is 1.4.20, so unlikely
It works as you see it. If it does not work for you, I guess you did something wrongly.
b
Hmmmm, yeah, I had to modify it to take out so stuff that was specific to your case.
When you run
kotlinNpmInstall
does it copy the
yarn.lock
to the build directory then?
v
The only thing that is specific to my project is the
ncc-packer
I think. If you left out more you probably broke it.
b
Ok. I also don't have the
cleanGenerateExternalsIntegrated
task in my proj. So I had to remove that too.
v
That's a standard task of Kotlin/JS
But if you don't run Dukat it might not be necessary at that place too
Oh and yes, after running
kotlinNpmInstall
it had copied it do
build/js
and then emptied it. Only the dependencies that were actually resolved remain in there. That nothing is left in there if you just run
kotlinNpmInstall
is normal.
afair at least
b
Ok. Here is what my build output looks like. It fails because a module isn't found for a dependency I'm trying to lock. https://pastebin.com/h1bXRwWu
Is that copy at the right place?
v
I don't know whether it is different with KMM or KMP, I just use Kotlin/JS
But I'd guess so
b
Hmmm, good point. I guess I could try with just Kotlin/JS.
Oh well, I'll keep scratching my head. Thanks for the help!