Trying to upgrade Kotlin from 2.2.0 -> 2.2.10 a...
# javascript
g
Trying to upgrade Kotlin from 2.2.0 -> 2.2.10 and started getting this error:
Copy code
Execution failed for task ':kotlinNpmInstall'.
>                 Process 'Resolving NPM dependencies using yarn' returns 1
                  Unknown Syntax Error: Unsupported option name ("--network-concurrency").
Any workaround?
v
Do you maybe use an ancient yarn version? That option exists for nearly 10 years.
e
For reference, this was introduced in https://youtrack.jetbrains.com/issue/KT-78504 I also left a comment asking why using it, since there is also a mutex being used.
g
We’re not specifying any particular Yarn version anywhere.
e
Are you on Windows?
Look under
%USER_HOME%/.gradle/yarn
, which versions do you see?
g
Happens both on Mac and Linux CI.
Copy code
ls ~/.gradle/yarn
yarn-v1.22.10/      yarn-v1.22.10.hash  yarn-v1.22.17/      yarn-v1.22.17.hash
e
Could you try checking their
--help
to see if they both list
--network-concurrency
?
a
@Ilya Goncharov [JB] ^^
g
We have
Copy code
rootProject.the<YarnRootEnvSpec>().download = false
I guess for build performance reasons. Setting that to
true
resolves the issue, so I’ll do some digging to figure out what Yarn versions we have installed. Looks like I also have 4.6.0 which doesn’t support the
--network-concurrency
option. Thanks for the help!
e
Remember to use Yarn Classic only, for compatibility reasons. Or, you can switch to npm. See https://kotlinlang.org/docs/js-project-setup.html#npm-dependencies
thank you color 1