Read the statement by Michael Teeuw here.
After updating MM is not displaying
-
Hello,
I am pretty new to MM and used the sdetweil script to install it on a Pi 3b+. It was running great until I seen that an update was available. Of course I didn’t document how I originally installed it so went to the MM site and ran the git pull && npm run install-mm commands, which didn’t work right if I remember. I then found the sdetweil scripts again and ran the update script. That seemed to work without errors but I still got no display.
I looked at the update log and found that Node and NPM were not new enough so I updated those and rebooted. pm2 says that MagicMirror is running but it still isn’t displaying. Any help would be great.
This is in the error log:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module ‘undici’
Require stack:- /home/pi/MagicMirror/js/app.js
- /home/pi/MagicMirror/js/electron.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1232:15)
at s._resolveFilename (node:electron/js2c/browser_init:2:120689)
at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
at Module._load (node:internal/modules/cjs/loader:1058:27)
at c._load (node:electron/js2c/node_init:2:16955)
at Module.require (node:internal/modules/cjs/loader:1318:19)
at require (node:internal/modules/helpers:179:18)
at Object. (/home/pi/MagicMirror/js/app.js:15:40)
at Module._compile (node:internal/modules/cjs/loader:1484:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1564:10)
at Module.load (node:internal/modules/cjs/loader:1295:32)
at Module._load (node:internal/modules/cjs/loader:1111:12)
at c._load (node:electron/js2c/node_init:2:16955)
at Module.require (node:internal/modules/cjs/loader:1318:19)
at require (node:internal/modules/helpers:179:18)
at Object. (/home/pi/MagicMirror/js/electron.js:4:14)
Thanks!
-
@sixt9stang said in After updating MM is not displaying:
Error: Cannot find module ‘undici’
yeh, you got the new code, but need to upgrade nodejs as well…
when you ran my upgrade script, did you notice there are TWO different commands
one with no parm
one with applywell, BECAUSE you have alreadu upgraded the code… this is the same version you already have. I won’t do an upgrade over accidentally…
If you are in this spot do the force upgrade
copy/paste the command
change the apply parm (at the end) to force -
@sidewall I ran the bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)”
From your GitHub. Do I just download the actual script, change and then run it? -
@sixt9stang just copy paste the line, no downloading…
if there is no parm at the end it does a check, but doesn’t DO anything…
this is to tell you if there are things you might have forgotten about before the whack everything
then if all looks good
you copy paste the second one,
it has apply on the endthis one DOES the work…
BUT, I won’t let you upgrade OVER your pretty upgraded system… accidentally
so as I check the version, and you are ON the current version
the apply run will terminate because you don’t need itwell. SOMETIMES you do…
so copy paste and add
force instead of applytest looks like this
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)”
doit looks like this
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)” apply
and FORCE looks like this
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)” force
-
@sdetweil Thanks! Back up and running. I was not reading your github correctly. I kept reading and thinking the second command was going to try pushing changes from my local install to the online repository. I am pretty new to github. Thanks again for the help!
-
-
@sixt9stang no problem… the backup/restore scripts support saving your mm config pn githib private repo
-
@sdetweil I will start playing with that to help learn to use github.