https://kotlinlang.org logo
#webassembly
Title
# webassembly
e

eygraber

11/27/2023, 9:47 PM
I'm using this to run wasm tests because it seems like the latest stable doesn't have the updated opcodes (from here), but I'm getting errors about NPM not being able to work with that version. Anyone else doing this that can point me in the right direction?
Copy code
rootProject.the<NodeJsRootExtension>().apply {
    nodeVersion = "21.0.0-v8-canary20231024d0ddc81258"
    nodeDownloadBaseUrl = "<https://nodejs.org/download/v8-canary>"
}

tasks.withType<KotlinNpmInstallTask>().configureEach {
    args.add("--ignore-engines")
}
r

Robert Jaros

11/27/2023, 10:45 PM
Try
rootProject.tasks.withType....
e

eygraber

11/27/2023, 10:48 PM
I think that part is working, here's the error:
Copy code
Task :kotlinNpmInstall
warning You are using Node "22.0.0-v8-canary20231027fc15c384ea" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
(node:2507267) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
warning workspace-aggregator-ecbd5ac7-79d8-471b-a6a7-d94fcc8c0ce1 > kotlin-inject-kotlin-inject-runtime-test > source-map-loader > abab@2.0.6: Use your platform's native atob() and btoa() methods instead
error source-map-loader@4.0.1: The engine "node" is incompatible with this module. Expected version ">= 14.15.0". Got "22.0.0-v8-canary20231027fc15c384ea"
error Found incompatible module.
Oh you're saying I missed the
rootProject
for the tasks. That's it, thanks!
2 Views