Read the statement by Michael Teeuw here.
MagicMirror Failing on Raspberry Pi Zero W Rev 1.1
-
@sdetweil Okay. Next issue is that
MagicMirror-out.log
is always empty. I recall that I could find lots of information in there the last time I was setting up a MM, but this time it’s always just blank. (TheMagicMirror-error.log
file is, sadly, useless because it’s just filled with tens of thousands of lines ofError: Cannot find module 'electron'
.)Any idea why
MagicMirror-out.log
is always empty? -
@davidgagne out is empty cause mm never started
Does
npm run server
Work -
@sdetweil I’m sorry, but I don’t understand. What exactly is
mm
? (MagicMirror is running.)What does
npm run server
do? (I can visit the IP address of the Pi on my phone or laptop on my home network.) -
@sdetweil Calling
npm run server
immediately after connecting via ssh yields:npm error code ENOENT npm error syscall open npm error path /home/dvg/package.json npm error errno -2 npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/home/dvg/package.json' npm error enoent This is related to npm not being able to find a file. npm error enoent npm error A complete log of this run can be found in: /home/dvg/.npm/_logs/2024-08-05T16_42_00_562Z-debug-0.log
If I switch to the MagicMirror directory and call it, I get this:
> magicmirror@2.28.0 server > node ./serveronly [2024-08-05 12:43:48.489] [LOG] Starting MagicMirror: v2.28.0 [2024-08-05 12:43:48.956] [LOG] Loading config ... [2024-08-05 12:43:49.021] [LOG] config template file not exists, no envsubst [2024-08-05 12:43:56.659] [LOG] Loading module helpers ... [2024-08-05 12:43:56.760] [LOG] No helper found for module: alert. [2024-08-05 12:43:57.912] [LOG] Initializing new module helper ... [2024-08-05 12:43:58.105] [LOG] Module helper loaded: updatenotification [2024-08-05 12:43:58.210] [LOG] No helper found for module: clock. [2024-08-05 12:43:58.475] [LOG] Initializing new module helper ... [2024-08-05 12:43:58.608] [LOG] Module helper loaded: mmm-systemtemperature [2024-08-05 12:43:58.784] [LOG] No helper found for module: weather. [2024-08-05 12:43:58.837] [LOG] No helper found for module: weather. [2024-08-05 12:44:06.841] [LOG] Initializing new module helper ... [2024-08-05 12:44:06.956] [LOG] Module helper loaded: MMM-ThemeParkWaitTimes [2024-08-05 12:44:08.953] [LOG] Initializing new module helper ... [2024-08-05 12:44:09.018] [LOG] Module helper loaded: MMM-birthdays [2024-08-05 12:44:09.067] [LOG] No helper found for module: MMM-CloneWarsQuotes. [2024-08-05 12:44:09.136] [LOG] Initializing new module helper ... [2024-08-05 12:44:09.228] [LOG] Module helper loaded: MMM-ThemeParkWaitTimes [2024-08-05 12:44:09.603] [LOG] Initializing new module helper ... [2024-08-05 12:44:09.673] [LOG] Module helper loaded: MMM-ImagesPhotos [2024-08-05 12:44:09.721] [LOG] All module helpers loaded. [2024-08-05 12:44:11.000] [LOG] Starting server on port 8080 ... [2024-08-05 12:44:11.743] [WARN] You're using a full whitelist configuration to allow for all IPs [2024-08-05 12:44:13.607] [ERROR] Whoops! There was an uncaught exception... [2024-08-05 12:44:14.335] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8080 at Server.setupListenHandle [as _listen2] (node:net:1872:16) at listenInCluster (node:net:1920:12) at doListen (node:net:2069:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'EADDRINUSE', errno: -98, syscall: 'listen', address: '0.0.0.0', port: 8080 } [2024-08-05 12:44:14.400] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [2024-08-05 12:44:14.422] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues [2024-08-05 12:47:35.279] [INFO] System information: ### SYSTEM: manufacturer: Raspberry Pi Foundation; model: Raspberry Pi Zero W Rev 1.1; raspberry: [object Object]; virtual: false ### OS: platform: linux; distro: Raspbian GNU/Linux; release: 11; arch: arm; kernel: 6.1.21+ ### VERSIONS: electron: undefined; used node: 20.9.0; installed node: 20.9.0; npm: 10.8.2; pm2: 5.4.2 ### OTHER: timeZone: America/New_York; ELECTRON_ENABLE_GPU: undefined
-
@davidgagne mm is my shorthand for MagicMirror
-
@davidgagne ok, another instance is already running
-
@sdetweil So then why is my
MagicMirror-out.log
always empty? -
@davidgagne do
pm2 status -
@sdetweil Executing
pm2 status
yields:┌────┬────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ ├────┼────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ │ 0 │ pm2 │ default │ 2.28.0 │ fork │ 1238 │ 17h │ 0 │ online │ 0% │ 240.0kb │ dvg │ enabled │ └────┴────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
-
@davidgagne that’s why the MagicMirror out log is empty, as the app name is pm2
How did you create that?
And the number under the curly circle next to status is the number of times it has restarted