Fail to install on windows
MargaretKrutikova opened this issue · 1 comments
When trying to install the library on windows, I first receive a couple of warnings (as expected), followed by an error:
...\node_modules\rpi-led-matrix\src\unsupported.cc(13,7): fatal error C1017:
invalid integer constant expression [...\node_modules\rpi-led-matrix\build\vendor.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\...\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\...\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
I followed the instructions on how to run node-gyp
on windows, but it seems like it is an actual error in the code 😕
Really appreciate any help on this!
Good news and bad news.
Bad news is I don't have access to a Windows machine to even begin to look into this. I also have zero experience developing in a Windows environment so this library's never been tested in one.
Good news is that I might know what the issue is, and I welcome you to open a PR that fixes it. 😊 That error seems to be coming from src/unsupported.cc
, whose #else
block executes whenever you try to install/build the library on a non-linux machine (including Macs). It basically allows the compilation of the binaries to be bypassed. IIRC, I pretty much copied that block from another native library (because I'm not at all skilled in the art of preprocessor directives). My guess is that there's some weird Windows case that need to be taken into account.
Googling the issue led me here. No idea if that's useful, but it seems like a good start. ¯_(ツ)_/¯
Sorry I couldn't be of more help!