Closed Egnos87 closed 7 months ago
hi @Egnos87, what version of node are you using? And can you confirm you have the latest version of this module installed?
Hi @0m4r, below the node version:
pi@raspberrypi:~ $ node -v v16.20.2
Yes, I installed the latest.
Tou should try updating the node version to 18+.
I installed MM v. 2.23.0, are you sure that of I update Node, will MM work as before?
Thanks.
It should: https://github.com/MagicMirrorOrg/MagicMirror/blob/master/package.json
Engine is set to be 18+
I've installed the previous version of MM (v. 2.23.0). I don't know if, installing a version of node 18+, MM v 2.23.0 still works...
I think it will, it is been a while since 18+ is the node version to use. ...but there is one way to know it, try it.
Ciao @0m4r, I tried to install Node v18.12.0 but nothing change. Any other advice?
Thanks.
Ciao @0m4r, I tried to install Node v18.12.0 but nothing change. Any other advice?
Thanks.
do you get the same error? can you see any other message in the logs?
Yes, now I have these errors and always "Loading..." on MM:
[31.03.2024 19:48.44.908] [ERROR] (node:1618) UnhandledPromiseRejectionWarning: ReferenceError: fetch is not defined at Class.doPost (/home/pi/MagicMirror/modules/MMM-SoccerLiveScore/node_helper.js:63:18) at Class.getLeagueIds (/home/pi/MagicMirror/modules/MMM-SoccerLiveScore/node_helper.js:77:29) at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-SoccerLiveScore/node_helper.js:348:12) at Socket.<anonymous> (/home/pi/MagicMirror/js/node_helper.js:107:11) at Socket.emit (node:events:513:28) at Socket.emitUntyped (/home/pi/MagicMirror/node_modules/socket.io/dist/typed-events.js:69:22) at /home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:703:39 at process.processTicksAndRejections (node:internal/process/task_queues:78:11) (Use
electron --trace-warnings ...to show where the warning was created) [31.03.2024 19:48.44.910] [ERROR] (node:1618) 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)
@Egnos87 I am not able to replicate it.
The one thing I can recommend you to do, if not done yet, is to go into the module folder and delete the node_modules
and package-lock.json
. Try again with npm i
and restart magic-mirror.
Done...but nothing! What does the error I showed you mean?
thanks
apparently, for some reason "fetch" is not found, and it has been introduced here: https://github.com/0m4r/MMM-SoccerLiveScore/pull/9/commits/331b88bf24a9cc8d1f48023e2b4c20e3351dc490
I do not get why it does not work for you, but you may want to try installing node-fetch.
From the MMM-SoccerLiveScore module folder do:
npm install node-fetch
and then in the node_helper.js file add this line:
const fetch = require('node-fetch');
and then restart magic mirror
Hi @0m4r and thanks for this module. This is my RPI configuration:
S.O.: Buster MM: v2.23.0 (the 2.24.0 version it gives me some problems…) RPI4 4gb
After the update to the last version the module stay in "Loading".
Below the LOG from the terminal
0|MagicMirror | [10.01.2024 23:59.42.118] [ERROR] (node:32661) UnhandledPromiseRejectionWarning: ReferenceError: fetch is not defined 0|MagicMirror | at Class.doPost (/home/pi/MagicMirror/modules/MMM-SoccerLiveScore/node_helper.js:63:18) 0|MagicMirror | at Class.getLeagueIds (/home/pi/MagicMirror/modules/MMM-SoccerLiveScore/node_helper.js:77:29) 0|MagicMirror | at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-SoccerLiveScore/node_helper.js:348:12) 0|MagicMirror | at Socket. (/home/pi/MagicMirror/js/node_helper.js:107:11)
0|MagicMirror | at Socket.emit (node:events:513:28)
0|MagicMirror | at Socket.emitUntyped (/home/pi/MagicMirror/node_modules/socket.io/dist/typed-events.js:69:22)
0|MagicMirror | at /home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:703:39
0|MagicMirror | at process.processTicksAndRejections (node:internal/process/task_queues:78:11)
0|MagicMirror | (Use
electron --trace-warnings ...
to show where the warning was created) 0|MagicMirror | [10.01.2024 23:59.42.158] [ERROR] (node:32661) 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)Could you hel me?
Thnaks.