OpenZWave / node-openzwave-shared

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

Build error with node alpine docker image #278

Closed robertsLando closed 5 years ago

robertsLando commented 5 years ago

I'm trying to compile node-openzave-shared inside a docker container but I can't fix this error on build

openzwave-shared@1.4.8 install /root/Zwave2Mqtt/node_modules/openzwave-shared
> node-gyp rebuild

make: Entering directory '/root/Zwave2Mqtt/node_modules/openzwave-shared/build'
  CXX(target) Release/obj.target/openzwave_shared/src/callbacks.o
In file included from ../src/callbacks.cc:18:
../src/openzwave.hpp:29:10: fatal error: Manager.h: No such file or directory
 #include "Manager.h"
          ^~~~~~~~~~~
compilation terminated.
make: Leaving directory '/root/Zwave2Mqtt/node_modules/openzwave-shared/build'
make: *** [openzwave_shared.target.mk:124: Release/obj.target/openzwave_shared/src/callbacks.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:197:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.15.0-46-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/Zwave2Mqtt/node_modules/openzwave-shared
gyp ERR! node -v v11.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN zwave2mqtt@1.0.0 No repository field.
npm WARN zwave2mqtt@1.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openzwave-shared@1.4.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the openzwave-shared@1.4.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-26T17_12_39_850Z-debug.log
robertsLando commented 5 years ago

Sorry my fault I have inverted the order of installations in my dockerfile and was tring to install openzwave-shared before openzwave