microsoft / microsoft/node-api-dotnet

Unable to find an entry point named "napi_create_platform" in DLL

Open
#213 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

libnode
Dominant language
C#
Stars
783
Forks
80
PR merge metrics
No merged PRs in 30d

Description

I've been trying to figure this out for days with different approaches, but I can't find a way for it to work.

var runtime = new NodejsPlatform("C:\\Program Files\\nodejs\\node.exe");

This line to use NodeJS in the C# application fails no matter what I do. Initially, I was trying to connect it to Electron binary, but when it failed I figured they had changed something and that is why. I tried using the official Windows binary - but still to no avail. I even got Node to compile as a shared library to a .dll file. They all result in an error for lacking napi_create_platform. dumpbin shows a bunch of napi_ prefixed functions, but nothing with platform or engine in the name.

I even went into a digital archeologist mode and went through some of Node commit history, but I can't find the napi_create_platform function that would be a connection point to Node. There are only C++ classes. What am I missing?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the NodejsPlatform constructor shown in the issue and trace how it looks up napi_create_platform in the selected DLL. Compare the exports of the official Windows Node binary and the compiled shared library using dumpbin. Done means identifying a compatible binary/API combination or documenting why the requested entry point is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, node.js
Domain
backend, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.