loke
12/30/2023, 7:45 AMerror mocha@10.2.0: The engine "node" is incompatible with this module. Expected version ">= 14.0.0". Got "21.0.0-v8-canary202309143a48826a08"
error Found incompatible module.
> Task :kotlinNpmInstall FAILED
Apparently it doesn't understand that 21.xxxx is higher than 14?
I wonder if my issues could be related to me having multiple subprojects, but I added the hack to all the modules that use nodejs, and I still get the same problem.
Any suggestions?sdeleuze
12/30/2023, 7:48 AMtasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}
loke
12/30/2023, 7:49 AMvar nodeExtension = ootProject.extensions.kotlinNodeJs
nodeExtension.nodeVersion = "21.0.0-v8-anary202309143a48826a08"
nodeExtension.nodeDownloadBaseUrl = <https://nodejs.org/download/v8-canary>"
tasks.withType(org.jetbrains.kotlin.gradle.targts.js.npm.tasks.KotlinNpmInstallTask.class).conigureEach {
if(!args.contains("--ignore-engines")) {
args.add("--ignore-engines")
}
}
loke
12/30/2023, 7:51 AMbuild.gradle
file that contains js code, even though I've only added wasmjs support for a single subprobject at the moment. The reason for this was that I figured that perhaps there was a conflict between the different subprojects, but it didn't change anything.loke
12/30/2023, 7:53 AMmpbugnum
.
https://codeberg.org/loke/array/src/branch/port-mpbignum-to-wasmjsloke
12/30/2023, 8:49 AM--ignore-engines
is to ignore the error that I have? Am I not adding it correctly in my groovy code?loke
12/30/2023, 1:05 PMtasks
variable, and it doesn't include the NotlinNpmInstallTask
. That would explain why it never adds --ignore-engines
.loke
12/30/2023, 1:05 PMloke
12/30/2023, 1:29 PM--ignore-engines
part needed to go in the kotlin
group in the root project. Weirdly enough, setting the node version needed to go in one of the subprojects (it doesn't appear to matter which one)