`node_watchdog.cc` error when using the fnm install node, but not the same version of the Debian installed node
I thought you would like to know I'm running into a weird bug and will not be using fnm because of it. I working on a library (atspi_inspect) that is a c++ add on built with node-gyp.
When I try to require the library using the fnm installed node, I get this error:
$ node
Welcome to Node.js v18.13.0.
Type ".help" for more information.
> const atspi_inspect = require("./atspi_inspect");
node[492428]: ../src/node_watchdog.cc:395:void node::SigintWatchdogHelper::Unregister(node::SigintWatchdogBase*): Assertion `(it) != (watchdogs_.end())' failed.
1: 0xb6b850 node::Abort() [node]
2: 0xb6b8ce [node]
3: 0xc36d92 node::SigintWatchdogHelper::Unregister(node::SigintWatchdogBase*) [node]
4: 0xc36e6a node::SigintWatchdog::~SigintWatchdog() [node]
5: 0xb5ef06 node::contextify::ContextifyScript::EvalMachine(v8::Local<v8::Context>, node::Environment*, long, bool, bool, bool, std::shared_ptr<v8::MicrotaskQueue>, v8::FunctionCallbackInfo<v8::Value> const&) [node]
6: 0xb5f840 node::contextify::ContextifyScript::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) [node]
7: 0xdb0230 [node]
8: 0xdb176f v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
9: 0x16ef579 [node]
Aborted
When I use the system installed node, I can successfully require the library:
$ nodejs
Welcome to Node.js v18.13.0.
Type ".help" for more information.
> const atspi_inspect = require("./atspi_inspect");
undefined
Notice that the node versions are the same.
Let me know if there is any other information that might help you debug this!
Oh, also I tried the most recent version of node (via fnm) and I get the same error. So both versions of node I tried via fnm error, but the node I installed via Debian's package manager does not give this error.