-
Notifications
You must be signed in to change notification settings - Fork 281
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
Importing JS modules (both CJS and ESM) doesn't work in GraalJS #1637
Comments
Is there any traction on this issue? Our team is evaluating Maestro, and we're running into an issue similar to the above. |
Having the same problem here |
same issue |
Same issue :( |
Hey @axelniklasson @igorsmotto any expectations for fixing this bug? |
hey @tiagodread! Bartek from mobile.dev team here. I see this issue is highly requested. I'll try to prioritize it in the coming weeks, because it looks like the benefit/effort required ratio is pretty good here. In the meantime, of course, we're always happy to accept contributions. |
This comment has been minimized.
This comment has been minimized.
@bartekpacia I've tested this scenario along with #2022 |
same issue. |
Describe the bug
Graaljs supports importing CommonJS or ECMAScript modules. However, due to maestro's
GraalJsEngine
implementation, no module imports work currently.This most likely happens as
Context.newBuilder("js")
is missing.allowIO(true)
here: https://github.com/mobile-dev-inc/maestro/blob/main/maestro-client/src/main/java/maestro/js/GraalJsEngine.kt#L83See more info on module imports in the graalVM reference manual: https://www.graalvm.org/latest/reference-manual/js/Modules/#ecmascript-modules-esm
To Reproduce
main.js
andenv.mjs
main.js
in e.g.main.yaml
maestro test main.yaml
Expected behavior
Importing CommonJS or ECMAScript modules should work.
Screenshots
Currently maestro tries to evaluate the import as a script.
The text was updated successfully, but these errors were encountered: