Read the statement by Michael Teeuw here.
Blank mm after update
-
@evroom said in Blank mm after update:
In my case a
$ npm audit fixsolved the dependency issues it found.
The npm audit warnings do not create any problems in running the mirror as far as I know. They also do not show up in the pm2 logs.
I would even be very careful as an inexperienced user to do that. “Fixing” these npm warnings on the root MM install could break the whole mirror (not the mirror itself of course :-)). Especially if you mess with the electron/chromium dependencies. -
@evroom got an error on the
egrep
command:pi@raspberrypi:~ $ cat /proc/device-tree/model Raspberry Pi 3 Model B Rev 1.2pi@raspberrypi:~ $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 8.0 (jessie) Release: 8.0 Codename: jessie pi@raspberrypi:~ $ npm --version 5.6.0 pi@raspberrypi:~ $ node --version v9.11.2 pi@raspberrypi:~ $ pm2 --version 3.5.1 pi@raspberrypi:~ $ cat /boot/config.txt | egrep -v '^$|^#|^[' grep: Invalid regular expression
-
@kvicksson said in Blank mm after update:
got an error on the egrep command
Forgot to escape the [, try this:
cat /boot/config.txt | egrep -v '^$|^#|^\['
EDIT: Did not forget to escape it, it is this shitty forum that removes it.
There needs to a backslash
\
before the last[
-
@lavolp3 said in Blank mm after update:
Fixing” these npm warnings on the root MM install could break the whole mirror
The npm audit itself suggests to fix it using the fix option.
I personally never had any issues with this command, but perhaps I was lucky till now.
Sometimes it cannot resolve an issue, but it never broke anything.But, if it appears to be that dangerous, then indeed it is perhaps to refrain from it when not really necessary.
-
@kvicksson said in Blank mm after update:
(node:2465) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
I saw this error once for a specific module.
Needed a small code change.
Will try to find what is was. -
This is a command to list all your modules that are in the config.js and which ones are enabled/disabled:
$ cat ~/MagicMirror/config/config.js | egrep 'module:|disabled' | sed -e 's/^[ \t]*//'
-
@evroom cool… how can u tell which module ‘disabled’ applies to?
system 1
module: "alert", disabled: false, module: "updatenotification", module: "clock", disabled: false, module: "calendar", disabled: false, module: "MMM-SleepWake", module: "newsfeed", disabled: false, disabled: false, module: 'WaterLevels', disabled: false, module: "MMM-ImagesPhotos", disabled: true, module: 'MMM-MQTTfloorplan', disabled: false, module: "MMM-AssistantMk2", module: "MMM-Hotword", disabled: false, disabled: true, module: "default/SampleModule", disabled: true, module: "MMM-GoogleMapsTraffic", disabled: true, module: "MMM-PC-Stats", disabled: true, module: 'mmm-weatherchart',
system 2
module: "alert", // module: "updatenotification", module: "clock", // module: "calendar", // module: 'MMM-WunderGround', // module: "newsfeed", disabled: false, module: "MMM-SleepWake", module: "MMM-ImagesPhotos", module: 'MMM-voice', disabled: false, module: 'WaterLevels', module: 'MMM-WatchDog',
system 3
module: "alert", module: "updatenotification", module: "clock", module: "calendar", disabled: true, module: "compliments", module: "currentweather", module: "weatherforecast", module: "newsfeed", module: "MMM-ImagesPhotos", disabled: false, module: "MMM-SleepWake",
i wrote this little piece of node js to find active modules for my upgrade script
const config = require('../config/config.js');const fs=require('fs'); for(let m of config.modules){ if(!(m.disabled || false)){ console.log(m.module); } }
-
@sdetweil said in Blank mm after update:
how can u tell which module ‘disabled’ applies to?
I am assuming it is sequential and that
disabled:
comes aftermodule:
, when present. Don’t think a ‘runaway’disabled
could exist.
And for the purpose it serves, it does its job, IMHO.Perhaps it is better to first remove the leading blank space and then do the grep (and to ignore the comment parts):
$ cat ~/MagicMirror/config/config.js | sed -e 's/^[ \t]*//' | egrep -w '^module:|^disabled:'
Your piece of node.js looks nice, but how to run it standalone ?
If used as part of a script, it makes more sense to do it this way (more control, more flexible). -
@sdetweil said in Blank mm after update:
module: “newsfeed”,
disabled: false,
disabled: false,I see now, that this is rather odd, not correct, without thinking too much about it.
Does my modified command give the same result ?
It sort of contradicts my statement on being sequential, etc.
Or do you really have ?module: "newsfeed", disabled: false, disabled: false, module: "MMM-Hotword", disabled: false, disabled: true,
-