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

ReferenceError: could not load module filename 'module' #137

Open
zero9527 opened this issue May 10, 2024 · 0 comments
Open

ReferenceError: could not load module filename 'module' #137

zero9527 opened this issue May 10, 2024 · 0 comments

Comments

@zero9527
Copy link

使用 koa 创建一个项目,然后通过webpack构建输出esmodule

在构建产物中,createRequire用来在 esmodule 中使用 require

import{createRequire as __WEBPACK_EXTERNAL_createRequire}from"module";
  • 通过nodejs可以正常执行
node dist/index.mjs
  • 但是 wasmedge_quickjs.wasm 不行
➜  wasmedge-quickjs git:(main) ✗ wasmedge --dir .:. wasmedge_quickjs.wasm example_js/http_server_koa/dist/index.mjs
[2024-05-10 11:32:36.359] [error]     AOT section -- number of codes not matching:6786 6740, use interpreter mode instead.
ReferenceError: could not load module filename 'module'
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