Closed kickouille closed 1 month ago
I think the problem is related to underlying lib as it is not compatible with node 20
Hi,
Maybe, or related to nan from Node.js https://github.com/nodejs/nan.
There are other similar cases, a bit old but which seem to have been fixed: https://github.com/nodejs/nan/issues/942 https://github.com/nodejs/nan/pull/941 https://github.com/nodejs/nan/pull/943
Are you able to reproduce?
Do you think it is worth opening an issue there?
Best regards,
Yanik
Ok, I fixed the problem, while reading the release notes of node-mbus. Juste sent you a PR to bump node-mbus from 2.2.2 to 2.2.4: https://github.com/robertsLando/node-red-contrib-m-bus/pull/42
To be noted that version of your module is stuck to 3.0.0 when installing from the palette: https://flows.nodered.org/node/node-red-contrib-m-bus Is it normal?
Regards,
Yanik
Hello,
One additional info, when changing from Node.js 18 to 20 or 22, an npm rebuild
of node-mbus may be necessary, I had to do it.
For Docker, proceed as follow:
docker exec -it nodered_node-red_1 bash
cd /data/node_modules/node-mbus/
npm rebuild
restart
your containerRegards,
Yanik
Hello,
I'm running Node-RED on Docker, and since version 4.0, official image is based on Node.js version 20 and 22. When jumping to version 4.0.2 I realized that your module didn't work anymore. I also tried to build my own images with different variants and here are the results: Node-RED 4.0.2, Node.js 20 or 22: fails Node-RED 3.1.11, Node.js 20 or 22: fails Node-RED 4.0.2, Node.js 18: succeeds
So it looks like it is more related to the version 20 and 22 of Node.js, or at least docker image of it. I tried building with base image node:20-alpine and node:20-debian nd results are the same.
It is certainly not related to your module, nor node-mbus, but most likely at the time of building mbus library.
Here is the output I get when it is failing:
Any idea on how to address this?
For the time being, I run my own image of Node-RED 4.0.2 on Node.js 18, especially because it runs on an armv6 and official image are not providing this platform, but this cannot be forever. To be noted that errors are present when building on armv6 but also on amd64. So it is not platform dependent.
Regards,
Yanik