Skip to content

Conversation

irvinebroque
Copy link

@irvinebroque irvinebroque commented Mar 7, 2024

Uncaught Error: Supported JS engine not detected when running in dev or deploying

Is it this?

https://github.com/JetBrains/kotlin/blob/7d4ad9d9f9b895cdf0310c1c7614402ab87d449a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/compiler.kt#L301-L303

if (!isNodeJs && !isStandaloneJsVM && !isBrowser) {
  throw "Supported JS engine not detected";
}

bashor and others added 7 commits March 19, 2024 22:16
Co-authored-by: Brendan Irvine-Broque <brendanib@gmail.com>
* Change wording.
* Update some links.
* Add some other useful links.
Since ~3.46.0 wrangler is modifying an exported object, but wasm instance.exports is not modifiable, and it leads to runtime error.

Also:
* Make it compatible with both Kotlin 1.9.2x and upcoming 2.0.0.
* For 2.0.0 don't use default export to avoid errors in the console.
@aSemy
Copy link

aSemy commented May 26, 2024

Uncaught Error: Supported JS engine not detected when running in dev or deploying

Hi 👋

Kotlin/Wasm requires Node 22+ https://youtrack.jetbrains.com/issue/KT-65864. In Kotlin 2.0 the default Node version has been updated to 22, so updating Kotlin will fix this issue.

(If Kotlin 1.9 is required then possible to manually specify the NPM version (example) - but I recommend updating Kotlin to 2.0!)

Oops, sorry, I didn't see that this PR already contained this fix!

@mani1232
Copy link

mani1232 commented Mar 3, 2025

Update pls to Kotlin 2.1.10+ (latest at this moment is 2.1.20-RC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants