Cannot Rebuild
JxstJonas opened this issue · comments
Hello,
I have tried to build the node-simconnect
module. I got this error:
gyp: Call to 'node -e "require('nan')"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (node:events:376:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:284:12)
gyp ERR! System Windows_NT 10.0.19041
I have executed this npm run rebuild
in the node-simconncet directory and i use the 32-bit version of Node (v15.5.0
) on Windows.
I have no idea what else I can do.
Note: I am using the SDK from Microsoft Flight Simulator 2020.
I thank you in advance for your help
@EvenAR What version of node does this support? @JxstJonas My guess is that it doesn't support the latest version of Node. I have been trying to get this to work in Election and Nodejs v12.16.3 and had to change quite a bit of it. Hopefully Even can let us know what version he wrote this for or the version he plans to support.
I have been trying to get this to work in Election and Nodejs v12.16.3 and had to change quite a bit of it
I'm using this version
Under node 14.15.1 (was working fine under 12 as well) (64 bit)
Using electron v11.1.1
Without issue.
My "build" instructions
open powershell in admin mode
run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
cd app/node_modules/node-simconnect/
copy from C:/MSFS SDK/SimConnect SDK to SimConnect
rename SimConnect/include to SimConnect/inc
../../../node_modules/.bin/electron-rebuild --force
copy 'C:/MSFS SDK/SimConnect SDK/lib/SimConnect.dll' ./build/Release/
Adjusts paths to things as needed.
I tend to use an Electron two package.json approach
Closing this as the new version works natively with Electron.