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 am using version 0.8.8 for micorosft.javascript.nodeapi and nodeapi.generator nugets. I'm using the same version for JS import.
Issue is that when importing package to JS file I get a crashing error:
Unhandled Exception: System.EntryPointNotFoundException: Arg_EntryPointNotFoundExceptionParameterizedNoLibrary, napi_create_string_utf16
at System.Runtime.InteropServices.NativeLibrary.GetSymbol(IntPtr, String, Boolean) + 0x57
at Microsoft.JavaScript.NodeApi.Runtime.NodejsRuntime.CreateString(JSRuntime.napi_env, ReadOnlySpan`1, JSRuntime.napi_value&) + 0x62
at Microsoft.JavaScript.NodeApi.JSValue.CreateStringUtf16(String) + 0x72
at Microsoft.JavaScript.NodeApi.JSValue.op_Implicit(String) + 0x15
at Microsoft.JavaScript.NodeApi.DotNetHost.NativeHost.InitializeModule(JSRuntime.napi_env, JSRuntime.napi_value) + 0x435
I realize that in documentation it says to use import statement like import dotnet from 'node-api-dotnet/net8.0.js'; with ES module but this is also not working for me. I get error: JSException: Package subpath './net8.0.js' is not defined by "exports"
With this code if I remove dotnet import statement and just keep the exported callFromDotNet function from .js file I am able to call JS functions from .NET (one way communication), but how can I also call .NET methods from this same .js file?
Is two way communication like this possible? What am I doing wrong?
The text was updated successfully, but these errors were encountered:
I'm struggling to implement two way communication with this library. Issue might be related to #330.
I'm using .NET as my main program from which I load my JS (ES module, not CommonJS) like this:
And my JS file looks like this:
I am using version 0.8.8 for micorosft.javascript.nodeapi and nodeapi.generator nugets. I'm using the same version for JS import.
Issue is that when importing package to JS file I get a crashing error:
I realize that in documentation it says to use import statement like
import dotnet from 'node-api-dotnet/net8.0.js';
with ES module but this is also not working for me. I get error:JSException: Package subpath './net8.0.js' is not defined by "exports"
Is documentation found at https://microsoft.github.io/node-api-dotnet/ outdated?
With this code if I remove dotnet import statement and just keep the exported callFromDotNet function from .js file I am able to call JS functions from .NET (one way communication), but how can I also call .NET methods from this same .js file?
Is two way communication like this possible? What am I doing wrong?
The text was updated successfully, but these errors were encountered: