MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

MM2 will not start after update



  • Hey @ all,

    I updated my RP3 B+ with the following commands sudo apt-get update and sudo apt-get upgrade
    and my MagicMirror 2 with the following command cd ~/MagicMirror && git pull
    The last one got some errors so I had git 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 with npm 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. (/home/pi/MagicMirror/js/app.js:14:1)
        at Object. (/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. (/home/pi/MagicMirror/js/app.js:14:1)
        at Object. (/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. (/home/pi/MagicMirror/js/app.js:14:1)
        at Object. (/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 too

    my 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.log

    but 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 upgrade

    AND 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)” force

    install 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
    Updating packages ...
    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.
    Installing helper tools ...
    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.
    Check current Node installation ...
    Node currently installed. Checking version number.
    Minimum Node version: v10.1.0
    Installed Node version: v9.11.2
    Node should be upgraded.
    A 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 ..." 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 and npm 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 and npm restart but didn´t helped.

    was a typo. It should be "Afterwards I performed npm update and npm restart and it helped.

    Thank you very much.


Log in to reply