- When running
npm i
, node-gyp errors out with
../src/binding/measuresuite_binding.c:18:10: fatal error: node/node_api.h: No such file or directory
18 | #include <node/node_api.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
- This means that the
node/node_api.h
-header file could not be found. - Try using
find / -type f -name 'node_api.h'
to find the file and- either add the path to the
node
folder to theinclude_dirs
inbinding.gyp
in themeasuresuite
target; - or use
CFLAGS=-I/path/to/node npm i
while installing.
- either add the path to the
- If
node/node_api.h
could not be found, get the node-package from the node.js website extract, find thenode_api.h
in there and set the paths accordingly.
- When running
make check
- Some tests are skipped.
- Reason: Those require the CPU flags
BMI2
andADX
. - Resolution: You can check with
lscpu | grep -e bmi2 -e adx
if they are available. If yes, open a new Github Issue. If not, run the tests on a different CPU.
- When running
npm test
- Error:
vitest: command not found
- Reason: Node.js dependencies are not installed (i.e.
node_modules
does not exist) - Resolution:
npm i