Support for nodejs 14+
pkulijing opened this issue · comments
Hi there,
We are trying to do some visualization job using the js connector. Unfortunately it's noted in the doc that "It currently doesn’t work with versions 14+ because one of its dependencies is not yet compatible with that version". This basically means that we are forced to use nodejs 12, which seems impractical because nodejs 12 is expected to reach its end-of-life in a few months and already not supported by recent versions of some essential tools such as create-react-app and Electron.
Thus I'm wondering when is the dependency problem mentioned in the doc expected to be solved, making it possible to use rtidds-connector-js with newer LTS versions of nodejs?
By the way, I just made an attempt to use rtidds-connector-js with nodejs 16. The basic demo I wrote worked for a few seconds and then ended up in a crash
#
# Fatal error in , line 0
# Check failed: result.second.
#
#
#
#FailureMessage Object: 0x7fff2291de60
1: 0xb6d391 [node]
2: 0x1bf6a04 V8_Fatal(char const*, ...) [node]
3: 0xfc45d1 v8::internal::GlobalBackingStoreRegistry::Register(std::shared_ptr<v8::internal::BackingStore>) [node]
4: 0xd15a28 v8::ArrayBuffer::GetBackingStore() [node]
5: 0xab51e0 napi_get_typedarray_info [node]
6: 0x7fd328205430 [/home/lijing17/Developer/ddsdemo/node_modules/ref-struct-napi/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
7: 0x7fd32820af5f Napi::details::CallbackData<Napi::Value (*)(Napi::CallbackInfo const&), Napi::Value>::Wrapper(napi_env__*, napi_callback_info__*) [/home/lijing17/Developer/ddsdemo/node_modules/ref-struct-napi/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
8: 0xaabfcd [node]
9: 0xd4a82e [node]
10: 0xd4bc4f v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
11: 0x15e7dd9 [node]
[1] 73940 trace trap (core dumped) node demo_reader.js
And I found out the "dependency" problem you mentioned. Seems it hasn't been solved after such a long time, which basically prevents rtidds-connector-js from being practically useful. What a shame.
Any suggestions to work around this? I'm considering to use rtidds-gateway instead and introduce another protocol such as kafka to bridge the dds databus and the visualization toolchain (which is expected to be javascript-based). It's far from ideal because of the extra dependency and probable latency problem, but I'm unable to see any better way.
Hey @pkulijing
Yes we cannot support v14 or v16 right now due tohttps://github.com/node-ffi-napi/ref-napi/issues/54#issuecomment-835451871. As you can see in my latest comment there, I have found that Node v17 does in fact work. Is this something you could try?
Hi @samuelraeburn
That's a piece of exciting news. I've tried with node 17 and it does work. Now I can confidently push forward the efforts to visualize dds messages in javascript environment. Thanks for the update!