-
Notifications
You must be signed in to change notification settings - Fork 2
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
ESM Support #1
Comments
I was able to get it working by requiring the file that had the class Test < Nodo::Core
require importReact: "./importReact.js"
function :test, <<~JS
async (props) => {
const x = await importReact()
}
JS
end |
I tried to reproduce the problem and got the following error from Node:
There are some hints on the net regarding this error, but I was unable to make the dynamic class Foo < Nodo::Core
function :import_uuid, code: "async () => { return await import('uuid') }"
function :v4, code: "async () => { const uuid = await import_uuid(); return uuid.v4() }"
end didn't work. The main motivation for the creation of |
That's the same error that I got. It seems to boil down to the fact that Interestingly enough I can just create a file that exports a function that wraps |
The Nodo "class" definitions are run using I need to do some more research regarding the |
Added |
That's great, thanks. |
Hi, this is a very interesting package. I'm trying to figure out if I can get ES modules imported, but running into a fairly opaque node error that I can't track down:
I'm on Node 14, which supports dynamic import, at least with the CLI.
From what I can tell, this should set it up to support dynamic imports, but it does not appear to be doing that. Do you have any ideas?
Thanks!
Also, I'm curious what you're using this package for?
The text was updated successfully, but these errors were encountered: