Read the statement by Michael Teeuw here.
MagicMirror not working after upgrade
-
hello after launching this link here is the message I get what should I do thank you.
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)”
atrick@raspberrypi:~ $ cd ~/MagicMirror
patrick@raspberrypi:~/MagicMirror $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)”$$\ $$\ $$\ $$\ $$\ $$\ $$$$$$
$$$\ $$$ | _| $$$\ $$$ |_| $$ $$
$$$$\ $$$$ | $$$$$$\ $$$$$$\ $$\ $$$$$$$\ $$$$\ $$$$ |$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ _/ $$ |
$$$$$$ $$ | _$$\ $$ $$\ $$ |$$ |$$$$$$ $$ |$$ |$$ $$\ $$ $$\ $$ $$\ $$ $$\ $$$$$$ |
$$ $$$ $$ | $$$$$$$ |$$ / $$ |$$ |$$ / $$ $$$ $$ |$$ |$$ | _|$$ | _|$$ / $$ |$$ | _|$$ /
$$ |$ /$$ |$$ __$$ |$$ | $$ |$$ |$$ | $$ |$ /$$ |$$ |$$ | $$ | $$ | $$ |$$ | $$ |
$$ | _/ $$ |$$$$$$$ |$$$$$$$ |$$ |$$$$$$$\ $$ | _/ $$ |$$ |$$ | $$ | $$$$$$ |$$ | $$$$$$$$
_| _| _| _$$ |_| _|_| _|_|_| __| _/ _| _______|
$$\ $$ |
$$$$$$ |
_____/install log being saved to /home/patrick/install.log
Updating packages …
[ <=> ]
Installing helper tools …
Check current Node installation …
Node currently installed. Checking version number.
Minimum Node version: v20.18.1
Installed Node version: v20.9.0
Node should be upgraded.
A Node process is currently running. Can’t upgrade.
Please quit all Node processes and restart the installer.patrick 1341 1206 0 14:31 ? 00:00:00 sh -c DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js patrick 1342 1341 49 14:31 ? 00:02:35 node ./node_modules/.bin/electron js/electron.js patrick 1361 1342 32 14:31 ? 00:01:40 /home/patrick/MagicMirror/node_modules/electron/dist/electron js/electron.js patrick 1366 1361 0 14:31 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=zygote --no-zygote-sandbox patrick 1367 1361 0 14:31 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=zygote patrick 1369 1367 0 14:31 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=zygote patrick 1398 1366 0 14:32 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=gpu-process --enable-crash-reporter=3d6a43f6-4bcd-43f9-87e0-3874dce0da58,no_channel --user-data-dir=/home/patrick/.config/Electron --gpu-preferences=WAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAABgAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --shared-files --field-trial-handle=0,i,6854488977601974808,15412565450821572008,262144 --enable-features=kWebSQLAccess --disable-features=SpareRendererForSitePerProcess --variations-seed-version patrick 1402 1361 0 14:32 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=utility --utility-sub-type=network.mojom.NetworkService --lang=fr --service-sandbox-type=none --enable-crash-reporter=3d6a43f6-4bcd-43f9-87e0-3874dce0da58,no_channel --user-data-dir=/home/patrick/.config/Electron --shared-files=v8_context_snapshot_data:100 --field-trial-handle=0,i,6854488977601974808,15412565450821572008,262144 --enable-features=kWebSQLAccess --disable-features=SpareRendererForSitePerProcess --variations-seed-version patrick 1409 1398 0 14:32 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=broker
patrick@raspberrypi:~/MagicMir -
sh -c DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js
yes, that is MagicMirror
from package.json, for npm start (as seen on 2.30.0)"start:x11": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
you have to shutdown MagicMirror before upgrading
I don’t know what it is in the script, I just know that something is using nodejs and I have to upgrade it,
so it/they all have to stop -
patrick@raspberrypi:~ $ cd ~/MagicMirror
patrick@raspberrypi:~/MagicMirror $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)”
the log will be saved in /home/patrick/MagicMirror/installers/pm2_setup.log
[PM2][WARN] Applications MagicMirror not running, starting…
[PM2] App [MagicMirror] launched (1 instances)
┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ MagicMirror │ default │ 2.30.0 │ fork │ 2906 │ 0s │ 0 │ online │ 0% │ 2.5mb │ patrick │ enabled │
└────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[PM2] Saving current process list…
[PM2] Successfully saved in /home/patrick/.pm2/dump.pm2
patrick@raspberrypi:~/MagicMirror $ npm startmagicmirror@2.30.0 start
npm run start:x11magicmirror@2.30.0 start:x11
DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js[2025-01-22 15:57:16.896] [ERROR] App threw an error during load
[2025-01-22 15:57:16.904] [ERROR] Error: Cannot find module ‘undici’
Require stack:- /home/patrick/MagicMirror/js/app.js
- /home/patrick/MagicMirror/js/electron.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1055:15)
at s._resolveFilename (node:electron/js2c/browser_init:2:115476)
at Module._resolveFilename (/home/patrick/MagicMirror/node_modules/module-alias/index.js:49:29)
at Module._load (node:internal/modules/cjs/loader:908:27)
at c._load (node:electron/js2c/node_init:2:13672)
at Module.require (node:internal/modules/cjs/loader:1122:19)
at require (node:internal/modules/helpers:130:18)
at Object. (/home/patrick/MagicMirror/js/app.js:15:40)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1311:10)
at Module.load (node:internal/modules/cjs/loader:1098:32)
at Module._load (node:internal/modules/cjs/loader:945:12)
at c._load (node:electron/js2c/node_init:2:13672)
at Module.require (node:internal/modules/cjs/loader:1122:19)
at require (node:internal/modules/helpers:130:18)
at Object. (/home/patrick/MagicMirror/js/electron.js:4:14)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module ‘undici’
Require stack: - /home/patrick/MagicMirror/js/app.js
- /home/patrick/MagicMirror/js/electron.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1055:15)
at s._resolveFilename (node:electron/js2c/browser_init:2:115476)
at Module._resolveFilename (/home/patrick/MagicMirror/node_modules/module-alias/index.js:49:29)
at Module._load (node:internal/modules/cjs/loader:908:27)
at c._load (node:electron/js2c/node_init:2:13672)
at Module.require (node:internal/modules/cjs/loader:1122:19)
at require (node:internal/modules/helpers:130:18)
at Object. (/home/patrick/MagicMirror/js/app.js:15:40)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1311:10)
at Module.load (node:internal/modules/cjs/loader:1098:32)
at Module._load (node:internal/modules/cjs/loader:945:12)
at c._load (node:electron/js2c/node_init:2:13672)
at Module.require (node:internal/modules/cjs/loader:1122:19)
at require (node:internal/modules/helpers:130:18)
at Object. (/home/patrick/MagicMirror/js/electron.js:4:14)
-
@pat59 in the 1st above
you are already running MM
so you should use the upgrade script… not installthis is install bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)”
install should have aborted, cause you already have MM
can you show me ~/install.logthen you run the two upgrade scripts, one test and (if all is ok with test) then execute, two different copy/paste
can you show me ~/MagicMirror/installers/upgrade.log
the error means your nodejs did NOT get updated.
but somehow the new MM code was installed… -
patrick@raspberrypi:~ $ cd ~/install.log
bash: cd: /home/patrick/install.log: N’est pas un dossier
patrick@raspberrypi:~ $ -
patrick@raspberrypi:~ $ cd ~/install.log
bash: cd: /home/patrick/install.log: N’est pas un dossier
patrick@raspberrypi:~ $ cd ~/MagicMirror/installers/upgrade.log
bash: cd: /home/patrick/MagicMirror/installers/upgrade.log: N’est pas un dossier
patrick@raspberrypi:~ $ -
patrick@raspberrypi:~ $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)”
$$\ $$\ $$\ $$\ $$\ $$\ $$$$$$
$$$\ $$$ | _| $$$\ $$$ |_| $$ $$
$$$$\ $$$$ | $$$$$$\ $$$$$$\ $$\ $$$$$$$\ $$$$\ $$$$ |$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ _/ $$ |
$$$$$$ $$ | _$$\ $$ $$\ $$ |$$ |$$$$$$ $$ |$$ |$$ $$\ $$ $$\ $$ $$\ $$ $$\ $$$$$$ |
$$ $$$ $$ | $$$$$$$ |$$ / $$ |$$ |$$ / $$ $$$ $$ |$$ |$$ | _|$$ | _|$$ / $$ |$$ | _|$$ /
$$ |$ /$$ |$$ __$$ |$$ | $$ |$$ |$$ | $$ |$ /$$ |$$ |$$ | $$ | $$ | $$ |$$ | $$ |
$$ | _/ $$ |$$$$$$$ |$$$$$$$ |$$ |$$$$$$$\ $$ | _/ $$ |$$ |$$ | $$ | $$$$$$ |$$ | $$$$$$$$
_| _| _| _$$ |_| _|_| _|_|_| __| _/ _| _______|
$$\ $$ |
$$$$$$ |
_____/install log being saved to /home/patrick/install.log
Updating packages …
[ <=> ]
Installing helper tools …
Check current Node installation …
Node currently installed. Checking version number.
Minimum Node version: v20.18.1
Installed Node version: v20.9.0
Node should be upgraded.
A Node process is currently running. Can’t upgrade.
Please quit all Node processes and restart the installer.patrick 1987 1972 0 16:19 ? 00:00:00 sh -c DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js patrick 1988 1987 0 16:19 ? 00:00:00 node ./node_modules/.bin/electron js/electron.js patrick 1998 1988 0 16:19 ? 00:00:04 /home/patrick/MagicMirror/node_modules/electron/dist/electron js/electron.js patrick 2001 1998 0 16:19 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=zygote --no-zygote-sandbox patrick 2002 1998 0 16:19 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=zygote patrick 2004 2002 0 16:19 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=zygote patrick 2040 2001 0 16:19 ? 00:00:01 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=gpu-process --enable-crash-reporter=3d6a43f6-4bcd-43f9-87e0-3874dce0da58,no_channel --user-data-dir=/home/patrick/.config/Electron --gpu-preferences=WAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAABgAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --shared-files --field-trial-handle=0,i,12195679081471275551,8574617561069742386,262144 --enable-features=kWebSQLAccess --disable-features=SpareRendererForSitePerProcess --variations-seed-version patrick 2046 1998 0 16:19 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=utility --utility-sub-type=network.mojom.NetworkService --lang=fr --service-sandbox-type=none --enable-crash-reporter=3d6a43f6-4bcd-43f9-87e0-3874dce0da58,no_channel --user-data-dir=/home/patrick/.config/Electron --shared-files=v8_context_snapshot_data:100 --field-trial-handle=0,i,12195679081471275551,8574617561069742386,262144 --enable-features=kWebSQLAccess --disable-features=SpareRendererForSitePerProcess --variations-seed-version patrick 2070 2040 0 16:20 ? 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=broker patrick 2082 2060 0 16:20 pts/0 00:00:00 sh -c DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js patrick 2083 2082 0 16:20 pts/0 00:00:00 node ./node_modules/.bin/electron js/electron.js patrick 2093 2083 0 16:20 pts/0 00:00:03 /home/patrick/MagicMirror/node_modules/electron/dist/electron js/electron.js patrick 2096 2093 0 16:20 pts/0 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=zygote --no-zygote-sandbox patrick 2097 2093 0 16:20 pts/0 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=zygote patrick 2099 2097 0 16:20 pts/0 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=zygote patrick 2129 2096 0 16:20 pts/0 00:00:01 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=gpu-process --enable-crash-reporter=3d6a43f6-4bcd-43f9-87e0-3874dce0da58,no_channel --user-data-dir=/home/patrick/.config/Electron --gpu-preferences=WAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAABgAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --shared-files --field-trial-handle=0,i,3246569436277859428,16865193471212064356,262144 --enable-features=kWebSQLAccess --disable-features=SpareRendererForSitePerProcess --variations-seed-version patrick 2131 2093 0 16:20 pts/0 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=utility --utility-sub-type=network.mojom.NetworkService --lang=fr --service-sandbox-type=none --enable-crash-reporter=3d6a43f6-4bcd-43f9-87e0-3874dce0da58,no_channel --user-data-dir=/home/patrick/.config/Electron --shared-files=v8_context_snapshot_data:100 --field-trial-handle=0,i,3246569436277859428,16865193471212064356,262144 --enable-features=kWebSQLAccess --disable-features=SpareRendererForSitePerProcess --variations-seed-version patrick 2138 2129 0 16:20 pts/0 00:00:00 /home/patrick/MagicMirror/node_modules/electron/dist/electron --type=broker
patrick@raspberrypi:~ $
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)”
update log will be in /home/patrick/MagicMirror/installers/upgrade.logdoing test run = true, NO updates will be applied!
Check current Node installation …
Node currently installed. Checking version number.
Minimum Node version: v20.18.1
Installed Node version: v20.9.0
Node should be upgraded.
MagicMirror running under control of PM2, stopping -
doing test run = true, NO updates will be applied!
ok, you have install.log (not cd, cat to dump out contents, or nano to edit and view contents)
you DIDN’T have upgrade.log as you hadn’t run upgrade yet
things to know
-
install WILL NOT install OVER an existing MM system… you do NOT need me to screw up your setup
-
upgrade is dangerous, so I provide TWO paths
a . test for anything dangerous, lose files, lose changes, whatever … BUT DO NOT CHANGE ANYTHINGb. EXECUTE the upgrade, make changes,
the script for 2 (upgrade) is the same for and and b, but no parameters for test, and apply parameter for execute
(I provide 2 links so you don’t have to remember)
but, I still don’t know how you got the code installed…
did you do the manual upgrade attempt firstgit pull && npm run install-mm
and it failed (cause you don’t have the right version of nodejs installed…)
SO, there is ONE more step
copy/paste the execute link
BUT change the word
apply
to
forceI don’t document this one as I don’t want people using it accidentally
now, please excuse my rudeness here… I see french is your native language…, you DO know you can TRANSLATE my module readme page, in the browser, right?
and if you do so and still don’t understand what I wrote, I am happy to make corrections that would make things more clear. I appreciate your input, I want to make this safe and reliable and easy to usewe can take that discussion offline. If you write to me in french I will translate and return my response in french
-
-
merci pour votre gentillesse je suis novice désolé de prendrez de votre temps encore merci
voila ce que je viens de faire pour la mise a niveau.patrick@raspberrypi:~ $ cd ~/MagicMirror
patrick@raspberrypi:~/MagicMirror $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)”
update log will be in /home/patrick/MagicMirror/installers/upgrade.logdoing test run = true, NO updates will be applied!
Check current Node installation …
Node currently installed. Checking version number.
Minimum Node version: v20.18.1
Installed Node version: v20.9.0
Node should be upgraded.
Node.js upgrade defered, doing test run
Check current NPM installation …
NPM currently installed. Checking version number.
Minimum npm version: V10.8.2
Installed npm version: V10.1.0
npm should be upgraded.
npm upgrade defered, doing test run …saving custom.css
(23) Failed writing body
upgrading from version 2.30.0 to 2.30.0
fetching latest revisionsChecking for modules with removed libraries
updating dependencies for active modules with package.json files
processing for module MMM-Remote-Control please wait ---------------------------------- skipped processing for MMM-Remote-Control, doing test run processing complete for module MMM-Remote-Control processing for module MMM-Saint please wait ---------------------------------- skipped processing for MMM-Saint, doing test run processing complete for module MMM-Saint processing for module MMM-network-signal please wait ---------------------------------- skipped processing for MMM-network-signal, doing test run processing complete for module MMM-network-signal processing for module MMM-FlipClock please wait ---------------------------------- skipped processing for MMM-FlipClock, doing test run processing complete for module MMM-FlipClock processing for module MMM-BME280 please wait ---------------------------------- skipped processing for MMM-BME280, doing test run processing complete for module MMM-BME280 processing for module MMM-PrixCarburants please wait ---------------------------------- skipped processing for MMM-PrixCarburants, doing test run processing complete for module MMM-PrixCarburants processing for module MMM-MeteoFrance please wait ---------------------------------- skipped processing for MMM-MeteoFrance, doing test run processing complete for module MMM-MeteoFrance processing for module MMM-FranceInfo please wait ---------------------------------- skipped processing for MMM-FranceInfo, doing test run processing complete for module MMM-FranceInfo processing for module MMM-SnowEffect please wait ---------------------------------- skipped processing for MMM-SnowEffect, doing test run processing complete for module MMM-SnowEffect
restoring custom.css
patrick@raspberrypi:~/MagicMirror $ -
@pat59 c’est à nouveau le test.
— faire un test = true, AUCUNE mise à jour ne sera appliquée !—vous avez besoin de la deuxième URL avec le mot « postuler » à la fin
et tu dois changer le mot‘appliquer’
à
‘forcer’
veuillez utiliser les mots anglais ici, le traducteur ne m’a pas donné la possibilité de désactiver cela
nous sommes tous novices dans beaucoup de choses dans notre vie, nous apprenons tous à notre rythme. J’espère que mes outils nous faciliteront la tâche.