Bugzilla – Bug 1195164
nodejs-devel doesn't work with node-gyp
Last modified: 2022-01-27 14:22:09 UTC
If you want to consume nodejs16-devel with a node-gyp project so it can use the headers it doesn't work:
This gives e.g. the following error:
make: Entering directory '/tmp/signal-desktop-1Tah1oUK/Signal-Desktop-5.29.0/node_modules/fs-xattr/build'
In file included from ../src/async.c:6:
../src/error.h:5:10: fatal error: node_api.h: No such file or directory
5 | #include <node_api.h>
node-gyp reads /usr/include/node16/common.gypi
If I add -I/usr/include/node16 to the cflags for linux, it is able to find the headers.
I had success using `--prefix=/usr/include/node16` instead:
Here is my patch for electron: