sync
sync copied to clipboard
cytubefilters fails to compile in node LTS (v22.14.0) and wiki says to use LTS
This is the error I get when doing npm install using node 21 or node 22 on debian:
npm error from /home/XXX/.cache/node-gyp/22.14.0/include/node/v8.h:24,
npm error from /home/XXX/.cache/node-gyp/22.14.0/include/node/node.h:73,
npm error from ../src/jsfilterlist.cc:1:
npm error /home/XXX/.cache/node-gyp/22.14.0/include/node/v8-local-handle.h: In instantiation of ‘v8::Local<T>::Local(v8::Local<S>) [with S = v8::Data; T = v8::Value]’:
npm error ../../nan/nan_callbacks_12_inl.h:175:53: required from here
npm error /home/XXX/.cache/node-gyp/22.14.0/include/node/v8-local-handle.h:269:42: error: static assertion failed: type check
npm error 269 | static_assert(std::is_base_of<T, S>::value, "type check");
npm error | ^~~~~
npm error make: *** [cytubefilters.target.mk:120: Release/obj.target/cytubefilters/src/jsfilterlist.o] Error 1
npm error gyp ERR! build error
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/home/XXX/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)
npm error gyp ERR! System Linux 5.10.0-26-amd64
npm error gyp ERR! command "/home/XXX/.nvm/versions/node/v22.14.0/bin/node" "/home/XXX/.nvm/versions/node/v22.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /home/XXX/YYYY/node_modules/cytubefilters
npm error gyp ERR! node -v v22.14.0
npm error gyp ERR! node-gyp -v v11.0.0
npm error gyp ERR! not ok
The installation guide (https://github.com/calzoneman/sync/wiki/CyTube-3.0-Installation-Guide) says:
The current Active LTS of node.js is recommended.
22.x is Active LTS since 2024-10-29. The version that works for me is v20.18.3.
It's likely that the dependency on nan needs to be upgraded to be compatible with newer versions of node: https://github.com/calzoneman/cytubefilters/blob/master/package.json#L11
Feel free to try this and submit a pull request if it fixes the problem for you.
PR has been merged. Closing.