1

I am wondering if there's a way to get Node to provide a more useful message about which module I might be missing in a C++ n-api node addon.

Here's the error:

PS C:\Users\digit\Desktop\workspace\addons\endec> node .\index.js --client
internal/modules/cjs/loader.js:840
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: The specified module could not be found.
\\?\C:\Users\digit\Desktop\workspace\addons\endec\build\Debug\testaddon.node

In this case, testaddon.node exists but it's dependent on a shared library (.dll) to run. Is there a way to debug and see what shared lib is missing?

If I add all the shared libs necessary, it works fine.

Sometimes, it's missing one and it can be tough to know which one I should be looking for.

4

0 回答 0