EvenAR / node-simconnect

A cross platform SimConnect client library for Node.JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on require

dbackeus opened this issue · comments

I'm running Windows 10 and installed the 32-bit version of Node via the official installer at https://nodejs.org/en/download/ including the extra build-tools via Chocolatey.

After npm intall node-simconnect and running const simConnect = require("node-simconnect") I get the following error:

node-simconnect: Loading pre-built binary
internal/modules/cjs/loader.js:1187
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
\\?\C:\Users\duztd\code\msfs2020\node_modules\node-simconnect\bin\win_ia32\node-simconnect.node
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1187:18)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\Users\duztd\code\msfs2020\node_modules\node-simconnect\index.js:16:22)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)

No idea how to proceed.

Also: My use-case is to integrate with Microsoft Flight Simulator 2020. Will this package work with the SimConnect provided by MSFS2020?

Confirming I have the same issue, However I am on the 64 bit version of node. I rebuilt the package per the instructions and included the MSFS 2020 sim connect binaries in my project.

So I've figured out a solution for the issue I was having. So after rebuilding the the package via npm run rebuild I then needed to manually copy the SimConnect.dll from the SimConnect folder into the build/Release folder. Figured this out thanks to this repo