@sdetweil said
you should know if you run
node serveronly, then the bytecode has to match the nodejs standalone engine version
OK, thanks.
It seems that rebuild have corrected the error for the module.
When I try to run a node-command in the shell (terminal) then I get an similar error message as above.
Is this caused by your explanation part above?
Different versions needed for either terminal or inside mirror?
Can you tell me HOW the magic mirror is started (when I have used your install script)?
Is there a way to test something which had to run in the mirror (like the module) on commandline?
To illustrate what I mean:
I have a very short test-script test-gpiod.js
// test-gpiod.js , Aug 2025, Dr. Ralf Korell
const { Chip } = require("node-libgpiod");
try {
const chip = new Chip(0);
console.log("Chip label:", chip.getChipLabel());
} catch (err) {
console.error("Error loading chip:", err);
}
which I try to run with
node test-gpiod.js
But this produces error message:
/home/pi/MagicMirror/modules/MMM-PresenceScreenControl/node_modules/bindings/bindings.js:121
throw e;
^
Error: The module '/home/pi/MagicMirror/modules/MMM-PresenceScreenControl/node_modules/node-libgpiod/build/Release/node-libgpiod.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 128. This version of Node.js requires
NODE_MODULE_VERSION 115. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Module._extensions..node (node:internal/modules/cjs/loader:1586:18)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at bindings (/home/pi/MagicMirror/modules/MMM-PresenceScreenControl/node_modules/bindings/bindings.js:112:48)
at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-PresenceScreenControl/node_modules/node-libgpiod/lib/misc.js:1:37)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32) {
code: 'ERR_DLOPEN_FAILED'
}
Node.js v20.18.1
Thanks for any help!
Warmest regards,
Ralf