Read the statement by Michael Teeuw here.
Solved MMM-ModuleToggleButton suddenly broken?
-
@philie pm2 collects the data in separate files normal and error. it’s hard to tell
do this
pm2 stop all cd ~/MagicMirror npm start >somfile.txt 2>&1
wait 20 seconds
ctrl-q
then edit somefile.txtafter we go it then
pm2 status
pm2 start xx
xx is the number or name of the managed app -
@sdetweil
Hey Sam,
thank you for your help.Here is the demanded output:
philie@magicmirror:~/MagicMirror $ npm start > debugger_log.txt 2>&1 philie@magicmirror:~/MagicMirror $ cat debugger_log.txt > magicmirror@2.26.0 start > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [14.02.2024 21:14.35.291] [LOG] Starting MagicMirror: v2.26.0 [14.02.2024 21:14.35.303] [LOG] Loading config ... [14.02.2024 21:14.35.315] [DEBUG] config template file not exists, no envsubst [14.02.2024 21:14.35.322] [LOG] Loading module helpers ... [14.02.2024 21:14.35.380] [ERROR] (node:20831) UnhandledPromiseRejectionWarning: Error: The module '/home/philie/node_modules/epoll/build/Release/epoll.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 115. This version of Node.js requires NODE_MODULE_VERSION 118. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at process.func [as dlopen] (node:electron/js2c/node_init:2:2107) at Object.<anonymous> (node:internal/modules/cjs/loader:1356:18) at Object.func [as .node] (node:electron/js2c/node_init:2:2107) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/node_init:2:13357) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:121:18) at bindings (/home/philie/node_modules/bindings/bindings.js:112:48) at /home/philie/node_modules/epoll/epoll.js:7:31 at Object.<anonymous> (/home/philie/node_modules/epoll/epoll.js:15:3) at Module._compile (node:internal/modules/cjs/loader:1271:14) at Object..js (node:internal/modules/cjs/loader:1326:10) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/node_init:2:13357) (Use `electron --trace-warnings ...` to show where the warning was created) [14.02.2024 21:14.35.382] [ERROR] (node:20831) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) /home/philie/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
So this tells me diretly that the version uf node.js is not sufficent.
if I try to upgrade it using npm rebuild it looks like the following:
philie@magicmirror:~/MagicMirror/modules/MMM-ModuleToggleButton $ sudo npm rebuild npm ERR! code 127 npm ERR! path /home/philie/MagicMirror/modules/MMM-ModuleToggleButton npm ERR! command failed npm ERR! command sh -c node_modules/.bin/electron-rebuild -e ../../node_modules/electron npm ERR! sh: 1: node_modules/.bin/electron-rebuild: not found npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-02-14T20_16_30_701Z-debug-0.log
How can I upgrade from 115 to 118?
-
@philie yep, the tools aren’t installed
and it needs more changesI won’t be able to get to it til later tonight
but if you look at my fork for MMM-Buttons
https://github.com/sdetweil/MMM-ButtonsI added a postinstall action in package json and added the postinstall script
you can run the postinstall without npm
./postinstall
-
@sdetweil
Hey Sam
Thank you very much.
To keep it simple, I installed your MMM-Buttons. The postinstall Script did run and I got positive Feedback regarding rebuilding Electron.When i start MM after, I get still the same Error as before…
philie@magicmirror:~/MagicMirror $ cat somfile.txt > magicmirror@2.26.0 start > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [15.02.2024 11:40.59.323] [LOG] Starting MagicMirror: v2.26.0 [15.02.2024 11:40.59.334] [LOG] Loading config ... [15.02.2024 11:40.59.345] [DEBUG] config template file not exists, no envsubst [15.02.2024 11:40.59.353] [LOG] Loading module helpers ... [15.02.2024 11:40.59.410] [ERROR] (node:1536) UnhandledPromiseRejectionWarning: Error: The module '/home/philie/node_modules/epoll/build/Release/epoll.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 115. This version of Node.js requires NODE_MODULE_VERSION 118. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at process.func [as dlopen] (node:electron/js2c/node_init:2:2107) at Object.<anonymous> (node:internal/modules/cjs/loader:1356:18) at Object.func [as .node] (node:electron/js2c/node_init:2:2107) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/node_init:2:13357) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:121:18) at bindings (/home/philie/node_modules/bindings/bindings.js:112:48) at /home/philie/node_modules/epoll/epoll.js:7:31 at Object.<anonymous> (/home/philie/node_modules/epoll/epoll.js:15:3) at Module._compile (node:internal/modules/cjs/loader:1271:14) at Object..js (node:internal/modules/cjs/loader:1326:10) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/node_init:2:13357) (Use `electron --trace-warnings ...` to show where the warning was created) [15.02.2024 11:40.59.412] [ERROR] (node:1536) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) /home/philie/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
-
@philie ok, two things…
1 lets fix the epoll problem.
it seems that was installed accidentally in the wrong place as its outside the MagicMirror folder/home/philie/node_modules/epoll
do
cd ~ rm -rf node_modules/epoll
2 use my fork of the MMM-ModuleToggleButton module which fixes the install
https://github.com/sdetweil/MMM-ModuleToggleButtonremove the old module folder, clone my fork and npm install it
cd ~/MagicMirror/modules rm -rf MMM-ModuleToggleButton git clone https://github.com/sdetweil/MMM-ModuleToggleButton cd MMM-ModuleToggleButton npm install
let me know
-
@sdetweil
Great! Module ist now installed fine and the test-confg (just the toggle module and another one to toggle activated) is working!Very much appreciated what you are doing for this community! Thank you!
-
@philie awesome!!!