:grey_question: Is there a way to pass a `--mutex ...
# javascript
g
Is there a way to pass a
--mutex file|network
flag to
KotlinNpmInstallTask
to effectively tell yarn to only use one instance? Context I have a multi-module composite build KotlinJS gradle project where I'd like to have a GitHub Action to run all unit tests via
./gradlew jsTest
. I'm able to run this locally just fine but on the CI it fails with a bunch of cache-related errors like
Copy code
error <https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz>: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, stat '/home/runner/.cache/yarn/v6/npm-raw-body-2.5.1-fe1b1628b181b700215e5fd42389f98b71392857-integrity/node_modules/raw-body/LICENSE'"
which led me to this issue and made me think that I'm hitting the same scenario. When I run the unit tests individually per project, they pass on the CI correctly. I am unsure why this works locally too 🤔
1
I've tried this but it doesn't seem to change anything
Copy code
tasks.withType<KotlinNpmInstallTask> {
    args += "--mutex file"
}
h
I don’t know but what about npm? KGP also supports npm as alternative for yarn, does it also have the same problem?
g
Hmm not sure. I actually found a solution that worked in my case 🙂
Thanks for replying though!