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

Asynchronous dynamic import #334

Open
AsyncProxy opened this issue May 9, 2024 · 6 comments
Open

Asynchronous dynamic import #334

AsyncProxy opened this issue May 9, 2024 · 6 comments

Comments

@AsyncProxy
Copy link

I'm getting an error when I'm using an asynchronous dynamic import

import('fs').then(obj => { console.log(obj) })

Error
[ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified. at importModuleDynamicallyCallback (node:internal/modules/esm/utils:231:9) at c.js:13:1 { code: 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING' }

@caoccao
Copy link
Owner

caoccao commented May 9, 2024

Please review this doc.

@AsyncProxy
Copy link
Author

Please review this doc.

I understand this workaround, but your interface start engine doesn't seem to have this setting to solve it

@caoccao
Copy link
Owner

caoccao commented May 10, 2024

You may pass the args via options. I haven't tried your case, but you could take a try.

@AsyncProxy
Copy link
Author

You may pass the args via options. I haven't tried your case, but you could take a try.

I'm sorry, I still can't do it, can you update it or help me implement it

@caoccao
Copy link
Owner

caoccao commented May 10, 2024

You might review this doc for detail.

public NodeRuntimeOptions setConsoleArguments(java.lang.String[] consoleArguments)

@AsyncProxy
Copy link
Author

您可以查看此文档以了解详细信息。

public NodeRuntimeOptions setConsoleArguments(java.lang.String[] consoleArguments)

There is no Api in NodeRuntime to get NodeRuntimeOptions

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

2 participants