Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Kotlin 1.9.22 and migrate to Kotlin/Wasm #6

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

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";
}

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
bashor and others added 7 commits March 19, 2024 22:16
Co-authored-by: Brendan Irvine-Broque <[email protected]>
* 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!

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.

3 participants