You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to build NodeJS from the fork suggested in #107 (the v20 branch), but even the build working and producing a libnode.so.115 in the <nodejs_root>/out/Release directory, I've got this error when trying to create the environment from C# code:
node:internal/bootstrap/switches/is_embedded_env:18
const internalLoader = new ESMLoader();
^
TypeError: ESMLoader is not a constructor
at node:internal/bootstrap/switches/is_embedded_env:18:24
at node:internal/main/embedding:18:34
Node.js v20.0.0
This is the way I'm doing it in C# code:
varlibnodePath="<nodejs_root>/out/Release/libnode.so.115";varnodejsPlatform=newNodejsPlatform(libnodePath);varnodejs=nodejsPlatform.CreateEnvironment();// Here the error was thrown
Am I doing something wrong, perhaps?
For the context: I'm working on Linux (x86_64 architecture).
The text was updated successfully, but these errors were encountered:
Your code looks fine. Sorry I haven't seen that ESMLoader error and I'm not sure how to fix it. You might try the v19 branch instead of the v20 branch; I'm not sure I tested the v20 branch.
We haven't been focusing as much on the libnode embedding scenarios lately, though I do intend to get back to that soon.
Just to post a feedback: it worked well with v19 (at least the error now is in my "dynamic code" from .NET side), so I think this problem is indeed with v20. I just don't know yet how to do things how I need, like getting results (in .NET) from an external script.js that exports some function calls, for instance.
In my scenario, I would not write .NET code that runs in Node, but would run JS in Node and interop with the .NET system (via JSExports and by calling script exports, like I stated above).
Thanks for the attention, @jasongin. Congratulations for the work here in this project. Hope it can evolve and stabilize soon!
Hello, dear maintainers/supporters!
I tried to build NodeJS from the fork suggested in #107 (the v20 branch), but even the build working and producing a
libnode.so.115
in the<nodejs_root>/out/Release
directory, I've got this error when trying to create the environment from C# code:node:internal/bootstrap/switches/is_embedded_env:18 const internalLoader = new ESMLoader(); ^ TypeError: ESMLoader is not a constructor at node:internal/bootstrap/switches/is_embedded_env:18:24 at node:internal/main/embedding:18:34 Node.js v20.0.0
This is the way I'm doing it in C# code:
Am I doing something wrong, perhaps?
For the context: I'm working on Linux (x86_64 architecture).
The text was updated successfully, but these errors were encountered: