Read the statement by Michael Teeuw here.
MM electron command not found after update
-
My MM will not start up anymore after performing the update. I updated with the git pull command in the MM folder. Then I got this error:
0|mm | A JavaScript error occurred in the main process 0|mm | Uncaught Exception: 0|mm | Error: Cannot find module 'module-alias/register' 0|mm | at Module._resolveFilename (internal/modules/cjs/loader.js:602:15) 0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) 0|mm | at Function.Module._load (internal/modules/cjs/loader.js:528:25) 0|mm | at Module.require (internal/modules/cjs/loader.js:658:17) 0|mm | at require (internal/modules/cjs/helpers.js:20:18) 0|mm | at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:15:1) 0|mm | at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:283:3) 0|mm | at Module._compile (internal/modules/cjs/loader.js:711:30) 0|mm | at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) 0|mm | at Module.load (internal/modules/cjs/loader.js:620:32)Searching the forum it seemed like this had to do with forgetting about including the npm install command. So that is what I did next. Both with the git pull and the second attempt with npm install I forgot to stop MM with pm2. Then I got this message about electron not beeing found:
0|mm | npm ERR! A complete log of this run can be found in: 0|mm | npm ERR! /home/pi/.npm/_logs/2020-01-05T20_04_07_508Z-debug.log 0|mm | ./run-start.sh: line 66: electron: command not found 0|mm | npm ERR! code ELIFECYCLE 0|mm | npm ERR! syscall spawn 0|mm | npm ERR! file sh 0|mm | npm ERR! errno ENOENT 0|mm | npm ERR! magicmirror@2.10.0 start: `./run-start.sh` 0|mm | npm ERR! spawn ENOENT 0|mm | npm ERR! 0|mm | npm ERR! Failed at the magicmirror@2.10.0 start script. 0|mm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 0|mm | 0|mm | npm ERR! A complete log of this run can be found in: 0|mm | npm ERR! /home/pi/.npm/_logs/2020-01-05T20_04_09_849Z-debug.logThen I tried running the installer supplied by Sam, as sugested in several post. Running the command “bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)” apply” didn’t throw any errors but after rebooting MM was not working. pm2 logs mm gives the same electron error as before and here is the log form the upgradescript:
Upgrade started - Sun Jan 5 21:07:58 CET 2020 system is Linux magicmirror 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster doing test run = true saving custom.css remote name = origin upgrading from version 2.10.0 to 2.10.0 fetching latest revisions git fetch rc=0 current branch = master On branch master Your branch is up to date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: package-lock.json Untracked files: (use "git add <file>..." to include in what will be committed) css/save_custom.css nohup.out no changes added to commit (use "git add" and/or "git commit -a") there are 1 local files that are different than the master repo package-lock.json save/restore files selection = Y test merge result rc='' , if empty, no conflicts skipping merge, only test run processing dependency changes for active modules with package.json files processing for module MMM-MyDutchWeather please wait ---------------------------------- skipped processing for MMM-MyDutchWeather, doing test run processing complete for module MMM-MyDutchWeather processing for module MMM-network-signal please wait ---------------------------------- skipped processing for MMM-network-signal, doing test run processing complete for module MMM-network-signal restoring custom.css test run, restoring files stashed Upgrade ended - Sun Jan 5 21:08:16 CET 2020 Upgrade started - Sun Jan 5 21:09:18 CET 2020 system is Linux magicmirror 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster user requested to apply changes doing test run = false saving custom.css remote name = origin local version 2.10.0 already same as master 2.10.0 restoring custom.css Upgrade ended - Sun Jan 5 21:09:18 CET 2020So it seems Electron is up to date, but somehow the command isn’t recognized. What can I do to solve the error?
-
@sdetweil
Just booted the MM and it is working again. Do no know why it now runs ok and yesterday not (didn’t do anything new). So I guess this topic is solved. -
@HarrisonHeroux do an
npm install
In the MagicMirror folder -
@sdetweil
Just booted the MM and it is working again. Do no know why it now runs ok and yesterday not (didn’t do anything new). So I guess this topic is solved.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login