Read the statement by Michael Teeuw here.
MM2 will not start after update
-
Hey @ all,
I updated my RP3 B+ with the following commands
sudo apt-get update
andsudo apt-get upgrade
and my MagicMirror 2 with the following commandcd ~/MagicMirror && git pull
The last one got some errors so I hadgit reset --hard
and thengit pull $$ npm install
it (as decribed here: update MagicMirror error - link to this forum) but now I can´t start the Mirror withnpm start
at the folder:~/MagicMirror
.This is the message which occurs:
> magicmirror@2.11.0 start /home/pi/MagicMirror > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js App threw an error during load Error: Cannot find module 'module-alias/register' at Module._resolveFilename (module.js:543:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (module.js:473:25) at Module.require (module.js:586:17) at require (internal/module.js:11:18) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:14:1) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:282:3) at Module._compile (module.js:642:30) at Object.Module._extensions..js (module.js:653:10) at Module.load (module.js:561:32) A JavaScript error occurred in the main process Uncaught Exception: Error: Cannot find module 'module-alias/register' at Module._resolveFilename (module.js:543:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (module.js:473:25) at Module.require (module.js:586:17) at require (internal/module.js:11:18) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:14:1) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:282:3) at Module._compile (module.js:642:30) at Object.Module._extensions..js (module.js:653:10) at Module.load (module.js:561:32) A JavaScript error occurred in the main process Uncaught Exception: Error: Cannot find module 'module-alias/register' at Module._resolveFilename (module.js:543:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (module.js:473:25) at Module.require (module.js:586:17) at require (internal/module.js:11:18) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:14:1) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:282:3) at Module._compile (module.js:642:30) at Object.Module._extensions..js (module.js:653:10) at Module.load (module.js:561:32)
Any suggestions how to solve it?
Thanks in advance -
@killing-joke for every module that has a package.json file, you need to do an
npm install
in their folder toomy upgrade script would have helped here, see
https://github.com/sdetweil/MagicMirror_scripts -
Hi @sdetweil,
this is my “second” pi and it´s an free-external-module pi.
Anyhow. I used your code but it didn´t worked for me/my pi - same error occurs.Unfortunately there is no log file “install.log” in the MagicMirror folder.
Files in my MM folder:- CHANGELOG.m d
- core (without file ending)
- dangerfile.js
- Gruntfile.js
- index.html
- jsconfig.json
- LICENSE.m d
- module-types.ts
- package.json
- package-lock.json
- README.m d
confused any suggestions?
-
@killing-joke said in MM2 will not start after update:
Unfortunately there is no log file “install.log” in the MagicMirror folder.
correct, if I am installing, I cannot out the loh IN the MM folder as it doesn’t exist yet,
so its in the user root ~/install.logbut there IS an upgrade.log in the installers folder as it said when it started
and its two pass, right?? 1st time to test, second time with more arguments to actually DO the upgradeAND if you did it manually once, you will have to FORCE it
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)” forceinstall is NEW (if u ran install again there should be a log at ~/install.log)
upgrade is update MM versions -
Hi @sdetweil,
I found the log file. I translated it into english
install starting - Fr Mai 22 17:59:08 CEST 2020 installing on armv7l processor system the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 9.11 (stretch) Release: 9.11 Codename: stretch [96mUpdating packages ...[90m OK:1 http://archive.raspberrypi.org/debian stretch InRelease OK:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease Holen:3 https://deb.nodesource.com/node_9.x stretch InRelease [4.623 B] Es wurden 4.623 B in 1 s geholt (3.548 B/s). packages reading... apt-get update completed ok apt-get upgrade started apt upgrade result =rc=0 packages reading... building dependecie tree.... status informationen reading.... calculating packages updated (Upgrade) ... hold back the following packages: libavfilter6 libavformat57 omxplayer piwiz python-gpiozero python3-gpiozero python3-thonny sense-emu-tools wolfram-engine 0 updated, 0 new installed, 0 deleted and 9 not updated. [96mInstalling helper tools ...[90m packages reading... building dependecie tree.... status informationen reading.... build-essential is the newest version (12.3). curl is already the newest version (7.52.1-5+deb9u10). git is already the newest version (1:2.11.0-3+deb9u6). unzip is already the newest version (6.0-21+deb9u2). wget is already the newest version (1.18-5+deb9u3). 0 updated, 0 new installed, 0 deleted and 9 not updated. [96mCheck current Node installation ...[0m [0mNode currently installed. Checking version number. [0mMinimum Node version: [1mv10.1.0[0m [0mInstalled Node version: [1mv9.11.2[0m [96mNode should be upgraded.[0m [91mA Node process is currently running. Can't upgrade. Please quit all Node processes and restart the installer.
afterwards the same error as described in the first post…
-
@killing-joke that is install, and something is already running.
Upgrade is different script.
-
Hi @sdetweil
yep, copied the wrong lines to my pi. Now i used the upgrade-code.
Upgrade started - Fr Mai 22 18:39:20 CEST 2020 system is Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 9.11 (stretch) Release: 9.11 Codename: stretch doing test run = true, NO updates will be applied! remote name = origin upgrading from version 2.11.0 to 2.11.0 fetching latest revisions git fetch rc=0 current branch = master On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) core nothing added to commit but untracked files present (use "git add" to track) no files different from github version test merge result rc='' , if empty, no conflicts skipping merge, only test run downloading dumpactivemodules script no modules found needing npm refresh removing git alias
Afterwards I performed
npm update
andnpm restart
but didn´t helped.
Now it´s working.
Thank you very much for your patience!!!(how can I mark the thread as solved? - under "Topic Tool its only possible the “Delete Topic” or “Ask as question” )
-
@killing-joke said in MM2 will not start after update:
doing test run = true, NO updates will be applied!
this is a two pass process… I tell you what MIGHT need to be done
then you run it again with ‘apply’ at the end of the command and i DO the update
this is for people that have lots of things that break on each update… -
@killing-joke said in MM2 will not start after update:
Afterwards I performed
npm update
andnpm restart
but didn´t helped.was a typo. It should be "Afterwards I performed
npm update
andnpm restart
and it helped.Thank you very much.