Read the statement by Michael Teeuw here.
Config error
-
While editing my modules I might have deleted or forgotten some brackets or commas. 🤦🏽♂️
I can’t figure out what is wrong so can someone here please help me?
Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ var config = { address: "0.0.0.0", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: [], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], language: "it", timeFormat: 24, units: "metric", modules: [ { module: 'MMM-Logging', disabled: false, config: { // Module functions out of the box with nothing set here. // See below for configurable options. } }, { module: 'MMM-Remote-Control', // uncomment the following line to show the URL of the remote control on the mirror // position: 'bottom_left', disabled: false // you can hide this module afterwards from the remote control itself }, { module: "MMM-RTSPStream", position: "bottom_left", disabled: false, config: { autoStart: false, rotateStreams: true, rotateStreamTimeout: 0, shutdownDelay: 0, moduleWidth: 440, moduleHeight: 247, // moduleOffset: { // left: -330, // top: -180 // }, localPlayer: 'omxplayer', remotePlayer: 'none', showSnapWhenPaused: false, remoteSnaps: false, stream1: { name: 'Sky TG24', url: 'http://****/1:0:1:5:7918:217C:EEEE0000:0:0:0:', protocol: "tcp", frameRate: 'undefined', width: 440, height: 247 }, stream2: { name: 'Rai 3 HD', url: 'http://****/1:0:1:2191:5:13E:EEEE0000:0:0:0:', protocol: "tcp", frameRate: 'undefined', width: 440, height: 247 }, stream3: { name: 'Rai 3 TGR Puglia', url: 'http://****/1:0:1:D4B:8800:13E:EEEE0000:0:0:0:', protocol: "tcp", frameRate: 'undefined', width: 440, height: 247 }, stream4: { name: 'Deejay TV HD', url: 'http://****/1:0:1:29:7918:217C:EEEE0000:0:0:0:', protocol: "tcp", frameRate: 'undefined', width: 440, height: 247 }, stream5: { name: 'Radio Deejay', url: 'http://****/1:0:2:9:204:1D:EEEE0000:0:0:0:', protocol: "tcp", frameRate: 'undefined', width: 440, height: 247 }, stream6: { name: 'Radio Capital', url: 'http://****/1:0:2:A:204:1D:EEEE0000:0:0:0:', protocol: "tcp", frameRate: 'undefined', width: 440, height: 247 }, stream7: { name: 'Radio 105', url: 'http://****/1:0:2:1FA7:32A:110:EEEE0000:0:0:0:', protocol: "tcp", frameRate: 'undefined', width: 440, height: 247 } } }, { module: "alert", config: { alert_effect: "genie", effect: "genie" } }, { module: "updatenotification", position: "top_bar" }, { module: "newsfeed", position: "bottom_bar", disabled: false, config: { feeds: [ { title: "Cambio Euro/Dollaro", url: "https://eur.fxexchangerate.com/usd.xml", encoding: "ISO-8859-16" }, { title: "Agenzia ANSA - Ultima Ora", url: "https://www.ansa.it/sito/notizie/topnews/topnews_rss.xml", }, { title: "Agenzia ANSA - Mondo", url: "https://www.ansa.it/sito/notizie/mondo/mondo_rss.xml" }, { title: "Hardware Upgrade", url: "https://feeds.hwupgrade.it/rss_hwup.xml", encoding: "ISO-8859-16" }, { title: "HDblog.it", url: "http://feeds.feedburner.com/hd-blog?format=xml" }, { title: "Tom's Hardware", url: "https://www.tomshw.it/feed/" }, { title: "LeccePrima", url: "http://www.lecceprima.it/rss/" } ], showSourceTitle: true, showPublishDate: true, showDescription: true, wrapTitle: false } }, { module: "MMM-AssistantMk2", position: "top_bar", disabled: false, config: { //onIdle: { // timer: 1000*10, //After 10sec of last query, // command: "RTSP_ACTIVATE" // }, onActivate: { timer: 0, command: "RTSP_DEACTIVATE" }, transcriptionHook: { "CHANNEL_1": { pattern: "Sky TG24", command: "CHANGE_CHANNEL_1" }, "CHANNEL_2": { pattern: "Rai3", command: "CHANGE_CHANNEL_2" }, "CHANNEL_3": { pattern: "Puglia", // pattern: "TGR", command: "CHANGE_CHANNEL_3" }, "CHANNEL_4": { pattern: "Deejay Tv", command: "CHANGE_CHANNEL_4" }, "CHANNEL_5": { pattern: "Radio Deejay", command: "CHANGE_CHANNEL_5" }, "CHANNEL_6": { pattern: "Radio Capital", command: "CHANGE_CHANNEL_6" }, "CHANNEL_7": { pattern: "Radio 105", command: "CHANGE_CHANNEL_7" }, "PROFILE1": { pattern: "Famiglia", command: "CHANGE_PROFILE_1" }, "PROFILE2": { pattern: "Mio", command: "CHANGE_PROFILE_2" } }, command: { "CHANGE_CHANNEL_1": { notificationExec: { notification: "RTSP-PLAY", payload: "stream1" } }, "CHANGE_CHANNEL_2": { notificationExec: { notification: "RTSP-PLAY", payload: "stream2" } }, "CHANGE_CHANNEL_3": { notificationExec: { notification: "RTSP-PLAY", payload: "stream3" } }, "CHANGE_CHANNEL_4": { notificationExec: { notification: "RTSP-PLAY", payload: "stream4" } }, "CHANGE_CHANNEL_5": { notificationExec: { notification: "RTSP-PLAY", payload: "stream5" } }, "CHANGE_CHANNEL_6": { notificationExec: { notification: "RTSP-PLAY", payload: "stream6" } }, "CHANGE_CHANNEL_7": { notificationExec: { notification: "RTSP-PLAY", payload: "stream7" } }, //"RTSP_ACTIVATE": { // notificationExec: { // notification: "RTSP-PLAY", // payload: "all" // } // }, "RTSP_DEACTIVATE": { notificationExec: { notification: "RTSP-STOP", payload: "all" } }, "CHANGE_PROFILE_1": { moduleExec: { module:[], exec: (module, params, key) => { var modules = ["alert", "updatenotification", "newsfeed", "MMM-AssistantMk2", "MMM-Hotword", "clock", "MMM-MyWeather"] if (modules.indexOf(module.name) >= 0) { module.show() } else { module.hide() } } } }, "CHANGE_PROFILE_2": { moduleExec: { module:[], exec: (module, params, key) => { var modules = ["MMM-RTSPStream", "MMM-CalendarExt2", "alert", "updatenotification", "newsfeed", "MMM-AssistantMk2", "MMM-PushBulletNotifications", "MMM-NowPlayingOnSpotify", "MMM-Hotword", "clock", "MMM-MyWeather"] if (modules.indexOf(module.name) >= 0) { module.show() } else { module.hide() } } } }, }, record: { recordProgram : "arecord", device: null, // device: "plughw:2,0", }, responseScreen: false, // If available, Assistant will response with some rendered HTML responseAlert: false, notifications: { ASSISTANT_ACTIVATED: "HOTWORD_PAUSE", ASSISTANT_DEACTIVATED: "HOTWORD_RESUME", }, deviceLocation: { coordinates: { latitude: ****, longitude: **** } }, profiles: { "default": { profileFile: "default.json", lang: "it-IT" } } } }, { module: "clock", position: "top_right", disabled: false, config: { displaySeconds: false, clockBold: true } }, { module: 'MMM-PushBulletNotifications', header: 'Notifications', position: 'top_right', // This can be any of the regions. disabled: false, config: { // See 'Configuration options' for more information. accessToken: "****", //PushBullet API Access Token numberOfNotifications: 3, showPushesSentToAllDevices: true, onlyAllowCommandsFromSourceDevices: [], fetchLimitPushBullet: 50, showPushes: true, showPushesOnLoad: true, showDismissedPushes: true, showMirroredNotifications: true, onlyShowLastNotificationFromApplication: false, showIndividualNotifications: false, showSMS: true, showMessage: true, showIcons: true, showDateTime: true, localesDateTime: 'it-IT', playSoundOnNotificationReceived: true, soundFile: 'modules/MMM-PushBulletNotifications/sounds/new-message.mp3', maxMsgCharacters: 50, maxHeaderCharacters: 32, showModuleIfNoNotifications: false, noNotificationsMessage: "Nessuna nuova notifica", debugMode: false, } }, { module: "MMM-NowPlayingOnSpotify", position: "top_right", disabled: false, config: { clientID: "****", clientSecret: "****", accessToken: "****", refreshToken: "****" } }, { module: "MMM-Hotword", disabled: false, config: { snowboy: [ { hotwords: "ehi specchio", //this will be sent to other module for distinguishing which hotword is detected. file: "resources/models/ehi_specchio.pmdl", sensitivity: '0.5', }, { hotwords: "ok specchio", file: "resources/models/ok_specchio.pmdl", sensitivity: '0.5', } ], record: { recordProgram: "arecord", device: null, }, autostart:true, onDetected: { notification: function (payload) { return "ASSISTANT_ACTIVATE" } }, payload: function (payload){ return { profile: payload.hotword } } } }, { module: "MMM-DarkSkyForecast", header: "Meteo", position: "top_left", classes: "default everyone", disabled: false, config: { apikey: "****", latitude: "****", longitude: "****", language: "it", forecastHeaderText: "****", label_timeFormat: "hh:mm", iconset: "4c", concise: false, showSummary: false, forecastLayout: "table" } } ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;} -
line 1 needs a /* at the very top left
the output you posted tells you where to look for the errors
-
@cr4z33
try:npm run config:check -
@justjim1220 thanks didn’t know about that. :)
Will run it as soon as I get home.
-
You have to be in the MM directory, FWIW.
I have a script set up in my root directory:
cd ~/MagicMirror
npm run config:check
cd ~ -
@bkeyport I know it. 😜
-
@justjim1220 the command stopped already at line 8 so I couldn’t find out where the error was.
pi@raspberrypi:~/MagicMirror $ npm run config:check > magicmirror@2.6.0 config:check /home/pi/MagicMirror > node tests/configs/check_config.js Checking file... /home/pi/MagicMirror/config/config.js Line 1 col 2 Expected an assignment or function call and instead saw an expression. Line 1 col 7 Missing semicolon. Line 1 col 8 Expected an assignment or function call and instead saw an expression. Line 1 col 14 Missing semicolon. Line 1 col 15 Expected an assignment or function call and instead saw an expression. Line 1 col 21 Missing semicolon. Line 2 col 2 Misleading line break before '*'; readers may interpret this as an expression boundary. Line 3 col 2 Expected an identifier and instead saw '*'. Line 3 col 2 Expected an assignment or function call and instead saw an expression. Line 3 col 3 Missing semicolon. Line 3 col 4 Expected an assignment or function call and instead saw an expression. Line 3 col 6 Missing semicolon. Line 3 col 7 Expected an assignment or function call and instead saw an expression. Line 3 col 14 Missing semicolon. Line 3 col 15 Expected an assignment or function call and instead saw an expression. Line 3 col 20 Missing semicolon. Line 4 col 2 Label 'http' on * statement. Line 4 col 2 Expected an identifier and instead saw '*'. Line 4 col 2 Expected an assignment or function call and instead saw an expression. Line 4 col 3 Missing semicolon. Line 4 col 4 Expected an assignment or function call and instead saw an expression. Line 4 col 7 Missing semicolon. Line 5 col 2 Expected an identifier and instead saw '*'. Line 5 col 2 Expected an assignment or function call and instead saw an expression. Line 5 col 3 Missing semicolon. Line 6 col 2 Expected an identifier and instead saw '*'. Line 6 col 2 Expected an assignment or function call and instead saw an expression. Line 6 col 3 Missing semicolon. Line 6 col 4 Expected an assignment or function call and instead saw an expression. Line 6 col 7 Missing semicolon. Line 6 col 8 Expected an assignment or function call and instead saw an expression. Line 6 col 12 Missing semicolon. Line 6 col 13 Expected an assignment or function call and instead saw an expression. Line 6 col 24 Missing semicolon. Line 6 col 25 Expected an assignment or function call and instead saw an expression. Line 6 col 28 Missing semicolon. Line 6 col 29 Expected an assignment or function call and instead saw an expression. Line 6 col 32 Missing semicolon. Line 6 col 33 Expected an assignment or function call and instead saw an expression. Line 6 col 36 Missing semicolon. Line 6 col 37 Expected an assignment or function call and instead saw an expression. Line 6 col 48 Missing semicolon. Line 6 col 49 Expected an assignment or function call and instead saw an expression. Line 6 col 53 Missing semicolon. Line 7 col 2 Misleading line break before '*'; readers may interpret this as an expression boundary. Line 7 col 4 Expected an assignment or function call and instead saw an expression. Line 7 col 7 Missing semicolon. Line 8 col 2 Label 'https' on * statement. Line 9 col 2 Unbegun comment. Line 8 col 2 Expected an identifier and instead saw '*'. Line 8 col 2 Too many errors. (1% scanned). -
line 1 needs a /* at the very top left
the output you posted tells you where to look for the errors
-
looks like the missing /* is causing all the rest of the error, fix that one and you should be good to go.
-
@justjim1220 good catch there thanks, but unfortunately I still get the config error. :disappointed_face:
-
@justjim1220 sorry didn’t read properly your suggestion and missed that forward slash! :smiling_face:
Everything is sorted now thanks again!
-
@cr4z33 glad to hear and you are fery welcome! :smiling_face_with_sunglasses:
-
@cr4z33 - I’m glad you got it figured out. Don’t forget to mark the topic as solved!
-
This site was helpful for me. As with everything MagicMirror everyone contributes to help everyone. Just erase the code on this page and copy and paste your code to see where your errors are. Works great for me. https://jshint.com/
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