Read the statement by Michael Teeuw here.
how to update my MM
-
same error :
pi@raspberrypi:~/MagicMirror $ pm2 start [PM2][ERROR] File ecosystem.config.js not found
and
pi@raspberrypi:~ $ pm2 start [PM2][ERROR] File ecosystem.config.js not found
-
@rikko14 ok, (when I said pm2 start, I assumed you would know to add the name or number , pm2 start 0)
do
pm2 save pm2 start 0
-
it works but I found this Electron problem … with a black screen :
see a the top right of my screen
-
@rikko14 black screen… yeh. I added code to fix that but the bad file format problems prevented
do
pm2 stop all
pm2 flush
pm2 start 0wait til MM comes up
pm2 stop all
then do this (1st post is enough)
https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-laterfor each module reporting a missing library (there are more than 1 library potentially missing, so I don’t give you the exact command to issue, but teach you how to find the error and fix it from there)
then after fixing for all modules with problem,
(note you MAY have to repeat this looking thru the log part, I don’t know if they ALL will report, or if it will stop after the 1st error)pm2 start 0
-
I’m not sure I understood and did the right thing …:
pi@raspberrypi:~ $ pm2 stop all [PM2] Applying action stopProcessId on app [all](ids: [ 0 ]) [PM2] [mm](0) ✓ ┌─────┬───────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ ├─────┼───────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ │ 0 │ mm │ default │ N/A │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ pi │ disabled │ └─────┴───────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘ pi@raspberrypi:~ $ pm2 flush [PM2] Flushing /home/pi/.pm2/pm2.log [PM2] Flushing: [PM2] /home/pi/.pm2/logs/mm-out.log [PM2] /home/pi/.pm2/logs/mm-error.log [PM2] Logs flushed pi@raspberrypi:~ $ pm2 start 0 [PM2] Applying action restartProcessId on app [0](ids: [ '0' ]) [PM2] [mm](0) ✓ [PM2] Process successfully started ┌─────┬───────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ ├─────┼───────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ │ 0 │ mm │ default │ N/A │ fork │ 29137 │ 0s │ 0 │ online │ 0% │ 2.4mb │ pi │ disabled │ └─────┴───────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘ pi@raspberrypi:~ $ pm2 stop all [PM2] Applying action stopProcessId on app [all](ids: [ 0 ]) [PM2] [mm](0) ✓ ┌─────┬───────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ ├─────┼───────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ │ 0 │ mm │ default │ N/A │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ pi │ disabled │ └─────┴───────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘ pi@raspberrypi:~ $ npm init -y Wrote to /home/pi/package.json: { "name": "pi", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC" } pi@raspberrypi:~ $ npm install ??? npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name "???": Tags may not have any characters that encodeURIComponent encodes. npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2022-01-13T15_57_40_124Z-debug.log pi@raspberrypi:~ $
-
@sdetweil Maybe combine the script and check if exist then update, else frsh install? Would that work?
-
@rikko14 npm init -y
what is going on…
the instructions say
cd modulename (where modulename is the module having the error) if the module does NOT provide a file called package.json, then do npm init -y
why are you doing this in the users home folder?
-
so i have to do first :
cd ~/MagicMirror/
and afternpm init -y
that’s right ? -
@mumblebaj said in how to update my MM:
Maybe combine the script and check if exist then update, else frsh install? Would that work?
what? check if what exist?
the problem here is that i looped thru all the installed modules, and found a package.json, which now requires a new
npm installin the module folder, BUT, the npm install failed cause of the networking problem
one that is finished, I loop thru all the modules and check to see if they use one of the troublesome libraries
and do NOT reference it in package.json…
and if NO package.json, then I create one, and THEN do the npm install of the libraryphew, all the same as the instructions i gave in the linked topic.
but there might be ANOTHER library too … that I don’t handle…
-
@rikko14 it says
to fix this you need to install the library in the module folder
cd ~/MagicMirror/modules
cd modulename (where modulename is the module having the error)
SO, you have to cd ~/MagicMirror/modules/modulename
same as every other time you were told to cd modulename