Read the statement by Michael Teeuw here.
mmm-avstock error
-
Hi.
Im totally new to this so bear with me.
Working on a MagicMirror and tryed to install avstock, but getting errors all the way.
Any1 see what is wrong here?],
showSourceTitle: true,
showPublishDate: true,
broadcastNewsFeeds: true,
broadcastNewsUpdates: true
}
},
{
module: “MMM-AVStock”,
position: “top_bar”, //“bottom_bar” is better formode:ticker
config: {
apiKey : “xxxxxxxxxxxxxxxx”,
timeFormat: “DD-MM HH:mm”,
width: null,
symbols : [“mpcc”, “GOOGL”, “TSLA”],
alias: [“MPCC”, “GOOGLE”, “TESLA”],
locale: config.english,
tickerDuration: 20,
chartDays: 90,
maxTableRows: null,
mode : “table”, // “table” or “ticker”
showChart: true,
pureLine: false,
chartWidth: null,
showVolume: true,
chartInterval: “daily”, // choose from [“intraday”, “daily”, “weekly”, “monthly”]
movingAverage: {
type: ‘SMA’,
periods: [200]
},
decimals : 2,
chartType: ‘candlestick’, // ‘line’, ‘candlestick’, or ‘ohlc’
chartLineColor: ‘#eee’,
chartLabelColor: ‘#eee’,
coloredCandles: true,
debug: false
}
},
]
};pi@raspberrypi:~/MagicMirror $ npm run start
magicmirror@2.18.0 start
DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js[15.03.2022 19:58.23.429] [LOG] Starting MagicMirror: v2.18.0
[15.03.2022 19:58.23.439] [LOG] Loading config …
[15.03.2022 19:58.23.446] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: ReferenceError: Cannot access ‘config’ before initialization
at Object. (/home/pi/MagicMirror/config/config.js:134:17)
at Module._compile (node:internal/modules/cjs/loader:1116:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1169:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:94:18)
at loadConfig (/home/pi/MagicMirror/js/app.js:69:14)
at App.start (/home/pi/MagicMirror/js/app.js:212:3)
[15.03.2022 19:58.23.450] [LOG] Loading module helpers …
[15.03.2022 19:58.23.473] [LOG] Initializing new module helper …
[15.03.2022 19:58.23.475] [LOG] Module helper loaded: updatenotification
[15.03.2022 19:58.23.477] [LOG] No helper found for module: helloworld.
[15.03.2022 19:58.23.478] [LOG] All module helpers loaded.
[15.03.2022 19:58.23.591] [LOG] Starting server on port 8080 …
[15.03.2022 19:58.23.610] [LOG] Server started …
[15.03.2022 19:58.23.611] [LOG] Connecting socket for: updatenotification
[15.03.2022 19:58.23.614] [LOG] Starting module helper: updatenotification
[15.03.2022 19:58.23.614] [LOG] Sockets connected & modules started …
[15.03.2022 19:58.23.896] [LOG] Launching application.
[15.03.2022 19:58.32.631] [LOG] Shutting down server…
[15.03.2022 19:58.32.633] [LOG] Stopping module helper: updatenotification -
@thona said in mmm-avstock error:
Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: ReferenceError: Cannot access ‘config’ before initialization
syntax error.
stop magicmirror
then
cd ~/MagicMirror npm run config:check