Conversation
Recommendations: * Do not run `npm test` * macOS and Ubuntu: Node.js v20.x and Python 3.12 * Windows: Node.js v16.x and Python 3.11 -- Do not run `node-gyp rebuild` Lessons learned: 1. Node.js >= v21 fails 2. Node.js >= 18 fails on Windows 3. Python >= 3.12 fails on Node.js 16 because of distlib fixed in node-gyp v10.0 4. `npm test` fails with: npm ERR! Missing script: "test" 5. `node-gyp rebuild` fails on Node.js 16
|
try and referenced nodejs patch: https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 Basically, any spawn of .cmd or .bat needs the shell:true option. |
|
With the above changes,, on windows, using node 22, tests work for node-ffi-napi, node-ref-napi, and ref-struct-ci, and they all then work together in my windows-root-certs once modified (which uses ref-struct and node-ffi to read a complex windows API from Cyrpto32.dll). I was giving up hope, but does not seem too bad :). out of interest, does appveyer test on OSX and linux? - I'll need the 'set' to work on all :( but my OSX machine is probably too old to build on now. |
|
Any updates on this? |
|
Did you try the alternatives mentioned in |
|
i did not, just switched to Node 16 using nvm. I couldn't change module to use another as advised in this issue, because i had this problem with Vosk, that has this in the dependencies and not ffi-napi itself |



Test results: https://github.com/cclauss/node-ffi-napi/actions
Recommendations:
npm testnode-gyp rebuildLessons learned:
distlibfixed in node-gyp v10.0npm testfails withnpm ERR! Missing script: "test"node-gyp rebuildfails on Node.js 16