OpenZWave / node-openzwave-shared

OpenZWave addon for Node.js (all versions) including management and security functions
Other
199 stars 113 forks source link

Problem in building OpenZwave for second time (Windows) #246

Closed Harel-M closed 5 years ago

Harel-M commented 6 years ago

Hi, I encountered a weird issue. I installed the addon using "npm install openzwave-shared" and it worked fine. Then I deleted it and deleted the OpenZWave folder from AppData\Local. When I tried to install the addon again, it didn't run the "install-ozw.js" file properly. I saw it execute it, but it just finished immediately and continued to the next stage, where it failed because it couldn't find the *.h files.

What I did is to install the addon again on a fresh windows installation on VM and took the OpenZWave folder from the AppData\Local there and put it on the first maching AppData\Local. Then when installing again on the first machine (the host), it behave the same way (skipping the "install-ozw.js") but it finish the installation and the addon is working.

I have two questions - 1) Is it safe to take the OpenZWave folder from another machine? Is there anything there related to the machine that built it, or should I expect no issues? 2) Why did it happen? how can I make npm properly build the OpenZWave folder after I delete it?

Thanks,

ekarak commented 5 years ago

Header files location is important to build the underlying C++ library. Use make install (or whatever's suitable for Windows) to copy them to a standard system location (rather than an arbitrary path) beforehand.