fastcall icon indicating copy to clipboard operation
fastcall copied to clipboard

"node.h" file not found error with Electron

Open SpaceK33z opened this issue 5 years ago • 2 comments

I followed cmake-js's readme to add compatibility with Electron, but get the following error:

Scanning dependencies of target ref
[ 58%] Building CXX object deps/ref-cmake/CMakeFiles/ref.dir/__/ref/src/binding.cc.o
/Users/kees/dev/cmake-js-electron-error/node_modules/fastcall/deps/ref/src/binding.cc:5:10: fatal error: 'node.h' file not found
#include "node.h"
         ^~~~~~~~
1 error generated.
gmake[2]: *** [deps/ref-cmake/CMakeFiles/ref.dir/build.make:63: deps/ref-cmake/CMakeFiles/ref.dir/__/ref/src/binding.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1252: deps/ref-cmake/CMakeFiles/ref.dir/all] Error 2
gmake: *** [Makefile:152: all] Error 2
ERR! OMG Process terminated: 2

It seems Node header files are missing, but I don't know how to add this?

It's very easy to reproduce, just make a package.json file with the following contents:

{
  "name": "cmake-js-electron-error",
  "dependencies": {
    "electron": "^4.0.4",
    "fastcall": "^0.2.6"
  },
  "cmake-js": {
    "runtime": "electron",
    "runtimeVersion": "4.0.4"
  }
}

Previously reported in https://github.com/cmake-js/cmake-js/issues/157

SpaceK33z avatar Feb 05 '19 10:02 SpaceK33z

Fixing https://github.com/cmake-js/fastcall/issues/44 will resolve it I think.

unbornchikken avatar Feb 05 '19 12:02 unbornchikken

Any update on this?

adolfosilva avatar Jul 23 '19 14:07 adolfosilva