- 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
nodefolder to theinclude_dirsinbinding.gypin themeasuresuitetarget; - or use
CFLAGS=-I/path/to/node npm iwhile installing.
- either add the path to the
- If
node/node_api.hcould not be found, get the node-package from the node.js website extract, find thenode_api.hin there and set the paths accordingly.
- When running
make check - Some tests are skipped.
- Reason: Those require the CPU flags
BMI2andADX. - Resolution: You can check with
lscpu | grep -e bmi2 -e adxif 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_modulesdoes not exist) - Resolution:
npm i