@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!
@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!
@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!
@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
@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?
Hello everyone.
I had installed the above module and had no problems with it. I then had to reset the Raspi because of another problem (who knows, maybe the problems are linked, the file system was suddenly broken and behaved strangely).
Anyway, I reinstalled all my modules, but the ModuleToggle doesn’t work anymore. The MM doesn’t even boot when the module is set to active.
When installing dependencies I get the following message:
philie@magicmirror:~/MagicMirror/modules/MMM-ModuleToggleButton $ sudo npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: MMM-ModuleToggleButton@1.0.0
npm ERR! Found: stylelint@15.11.0
npm ERR! node_modules/stylelint
npm ERR! peer stylelint@"15.x" from grunt-stylelint@0.19.0
npm ERR! node_modules/grunt-stylelint
npm ERR! dev grunt-stylelint@"latest" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev stylelint-config-standard@"latest" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: stylelint@16.2.1
npm ERR! node_modules/stylelint
npm ERR! peer stylelint@"^16.1.0" from stylelint-config-standard@36.0.0
npm ERR! node_modules/stylelint-config-standard
npm ERR! dev stylelint-config-standard@"latest" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /root/.npm/_logs/2024-02-13T20_26_05_190Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-02-13T20_26_05_190Z-debug-0.log
philie@magicmirror:~/MagicMirror/modules/MMM-ModuleToggleButton $
The pm2 log gives the following message when trying to start MM:
/home/philie/.pm2/logs/MagicMirror-out.log last 15 lines:
0|MagicMir | [13.02.2024 22:40.42.417] [LOG] Loading module helpers ...
0|MagicMir | [13.02.2024 22:40.42.421] [LOG] No helper found for module: alert.
0|MagicMir | [13.02.2024 22:40.42.446] [LOG] Initializing new module helper ...
0|MagicMir | [13.02.2024 22:40.42.448] [LOG] Module helper loaded: updatenotification
0|MagicMir | [13.02.2024 22:40.42.450] [LOG] No helper found for module: clock.
0|MagicMir | [13.02.2024 22:40.42.920] [LOG] Initializing new module helper ...
0|MagicMir | [13.02.2024 22:40.42.922] [LOG] Module helper loaded: calendar
0|MagicMir |
0|MagicMir | > magicmirror@2.26.0 start
0|MagicMir | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
0|MagicMir |
0|MagicMir | [13.02.2024 22:44.30.792] [LOG] Starting MagicMirror: v2.26.0
0|MagicMir | [13.02.2024 22:44.30.817] [LOG] Loading config ...
0|MagicMir | [13.02.2024 22:44.30.824] [DEBUG] config template file not exists, no envsubst
0|MagicMir | [13.02.2024 22:44.30.832] [LOG] Loading module helpers ...
/home/philie/.pm2/logs/MagicMirror-error.log last 15 lines:
0|MagicMir | at Module._compile (node:internal/modules/cjs/loader:1271:14)
0|MagicMir | at Object..js (node:internal/modules/cjs/loader:1326:10)
0|MagicMir | at Module.load (node:internal/modules/cjs/loader:1126:32)
0|MagicMir | at node:internal/modules/cjs/loader:967:12
0|MagicMir | at Function._load (node:electron/js2c/node_init:2:13357)
0|MagicMir | (Use `electron --trace-warnings ...` to show where the warning was created)
0|MagicMir | [13.02.2024 22:44.30.892] [ERROR] (node:4146) 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)
0|MagicMir | Warning: vkCreateInstance: Found no drivers!
0|MagicMir | Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
0|MagicMir | at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
0|MagicMir | at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
0|MagicMir | at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
0|MagicMir | at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
0|MagicMir | at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
0|MagicMir |
I have already installed ‘onoff’ manually. That didn’t help either. Does anyone know how to interpret the error message?
Many thanks in advance
@sdetweil
Update from my side right after the post of the message (I had to wait until the post was approved by the forum:
A simple restart of the Raspberry did the trick. It now works as expected. Side node: in my case, the calendar ID is simply the gmail address
@tommertron
Exactly the same situation here. The oAuth flow worked well, upcoming appointments appear on the CLI, but the module itself does not load. Have you got any further? one question: the calendar ID seems to be simply the gmail address… is that so? Thank you for your cooperation.
@sdetweil As mentioned, I have now also switched to a Raspbery Pi 3, installed MM cleanly using your script and then changed the openweathermap API onecall to 3.0 in the MMM-BMW-OW module, executed npm install request in the module folder, and now the module is running. Thank you very much for your support
@sdetweil ahh ok I didn’t know there is a difference to restart… :(
however now we’re talking:
I could figure out and fix the error in the node_helper.js. Now its working and this is the output:
root@magicmirror:/opt/magicmirror# npm run server
> magicmirror@2.26.0 server
> node ./serveronly
[03.01.2024 22:54.21.808] [LOG] Starting MagicMirror: v2.26.0
[03.01.2024 22:54.21.809] [LOG] Loading config ...
[03.01.2024 22:54.21.809] [DEBUG] config template file not exists, no envsubst
[03.01.2024 22:54.21.810] [LOG] Loading module helpers ...
[03.01.2024 22:54.21.811] [LOG] No helper found for module: alert.
[03.01.2024 22:54.21.814] [LOG] Initializing new module helper ...
[03.01.2024 22:54.21.814] [LOG] Module helper loaded: updatenotification
[03.01.2024 22:54.21.814] [LOG] No helper found for module: clock.
[03.01.2024 22:54.21.858] [LOG] Initializing new module helper ...
[03.01.2024 22:54.21.858] [LOG] Module helper loaded: calendar
[03.01.2024 22:54.21.858] [LOG] No helper found for module: MMM-AareGuru.
[03.01.2024 22:54.21.859] [ERROR] Whoops! There was an uncaught exception...
[03.01.2024 22:54.21.861] [ERROR] Error: Cannot find module 'request'
Require stack:
- /opt/magicmirror/modules/MMM-BMW-OW/node_helper.js
- /opt/magicmirror/js/app.js
- /opt/magicmirror/serveronly/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._resolveFilename (/opt/magicmirror/node_modules/module-alias/index.js:49:29)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (/opt/magicmirror/modules/MMM-BMW-OW/node_helper.js:9:17)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at loadModule (/opt/magicmirror/js/app.js:181:19)
at loadModules (/opt/magicmirror/js/app.js:211:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async App.start (/opt/magicmirror/js/app.js:259:3) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/magicmirror/modules/MMM-BMW-OW/node_helper.js',
'/opt/magicmirror/js/app.js',
'/opt/magicmirror/serveronly/index.js'
]
}
[03.01.2024 22:54.21.861] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[03.01.2024 22:54.21.861] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
root@magicmirror:/opt/magicmirror#
Still no functional MMM-BMW-OW though.
@sdetweil
there have been many libraries missing.
its the server version as LXC Container for proxmox. https://tteck.github.io/Proxmox/
I’ve deployed this for testing purposes. Guess I’m switching on propper Pi installation though!
Thank you very much for your help!
root@magicmirror:/opt/magicmirror/modules# npm restart
> magicmirror@2.26.0 restart
> npm stop --if-present && npm start
> magicmirror@2.26.0 start
> DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
/opt/magicmirror/node_modules/electron/dist/electron: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
This error did however already appear before the adjustement.
I’ve uncommented even
// console.log(body); // for checking
-> no logline. Quiet odd…