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

examples/hello_module is broken, produces "TypeError: not a function" #240

Open
gavrilyak opened this issue Feb 16, 2024 · 1 comment
Open

Comments

@gavrilyak
Copy link

Static JS compilation with modules worked in 2022 release.

git` bisect run /bin/sh -c "make clean examples/hello_module && ./examples/hello_module"

gives

6e4931c4ad6c1f06cd1e46ecbf98e04cbb8b4ba7 is the first bad commit
commit 6e4931c4ad6c1f06cd1e46ecbf98e04cbb8b4ba7
Author: Fabrice Bellard <[email protected]>
Date:   Wed Dec 27 17:10:47 2023 +0100

    top-level-await support - follow the spec in the implementation of the module linking and evaluation to avoid errors with cycling module dependencies

@gavrilyak
Copy link
Author

gavrilyak commented Feb 16, 2024

The cause is -fno-promise in HELLO_MODULE_OPTS in Makefile, it works after removing it. Looks like since the mentioned commit the module loading uses Promise internally, so -fno-promise won't work anymore.

GerHobbelt pushed a commit to GerHobbelt/quickjs that referenced this issue May 6, 2024
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

No branches or pull requests

1 participant