Read the statement by Michael Teeuw here.
Need help with config syntax error
-
Hey there,
i had to turn off my pi for a while since I’ve moved to a new location. During the starting sequence of MM it tells me I have syntax errors in my config. I can’t really imagine since I haven’t touched the config at all. JS syntax checkers keep telling me that the config is correct but my screen stays black.
Can somebody help me? It’s been a while since I have faced the syntax of the config file so I’m not familiar with it any longer.
Thank you very much
Starting MagicMirror: v2.1.1 Loading config ... Loading module helpers ... Initializing new module helper ... Module helper loaded: MMM-Admin-Interface Initializing new module helper ... Module helper loaded: MMM-voice No helper found for module: clock. Initializing new module helper ... Module helper loaded: calendar No helper found for module: compliments. No helper found for module: currentweather. No helper found for module: weatherforecast. Initializing new module helper ... Module helper loaded: MMM-DHT22 Initializing new module helper ... Module helper loaded: newsfeed WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration. Loading module helpers ... Initializing new module helper ... Module helper loaded: MMM-Admin-Interface Initializing new module helper ... Module helper loaded: MMM-voice No helper found for module: clock. Initializing new module helper ... Module helper loaded: calendar No helper found for module: compliments. No helper found for module: currentweather. No helper found for module: weatherforecast. Initializing new module helper ... Module helper loaded: MMM-DHT22 Initializing new module helper ... Module helper loaded: newsfeed App threw an error during load SyntaxError: Error parsing /home/pi/MagicMirror/modules/MMM-History/node_modules/request/package.json: Unexpected token in JSON at position 4111 at JSON.parse () at readPackage (module.js:92:52) at tryPackage (module.js:102:13) at Function.Module._findPath (module.js:183:20) at Module._resolveFilename (module.js:468:25) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/home/pi/MagicMirror/modules/MMM-History/node_helper.js:8:17) Whoops! There was an uncaught exception... { SyntaxError: Error parsing /home/pi/MagicMirror/modules/MMM-History/node_modules/request/package.json: Unexpected token in JSON at position 4111 at JSON.parse () at readPackage (module.js:92:52) at tryPackage (module.js:102:13) at Function.Module._findPath (module.js:183:20) at Module._resolveFilename (module.js:468:25) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/home/pi/MagicMirror/modules/MMM-History/node_helper.js:8:17) path: '/home/pi/MagicMirror/modules/MMM-History/node_modules/request/package.json' } MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues Launching application.
Config removed. yawns
-
destination: '###',, label: 'Fahrrad zur Arbeit',
There is an additional comma which needs to be removed after destination.
I removed your config from your post as it included apikeys which should not be disclosed
-
Hey,
thank you for your answer. About the additional comma. This happened when I replaced my personal information with ###. I have now removed the api keys. Thanks for taking care!
/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var config = { port: 8080, ipWhitelist: ["###"], // Set [] to allow all IP addresses. language: "de", timeFormat: 24, units: "metric", modules: [ //{ //module: "alert" //}, /*{ module: "updatenotification", position: "top_bar" },*/ { module: "MMM-Admin-Interface" }, { module: 'MMM-voice', position: 'top_left', config: { microphone: 1, keyword: 'MAGIC', timeout: 15 } }, { module: "clock", position: "top_left", config: { showWeek: true } }, { module: "calendar", header: "Deine Termine", position: "top_left", config: { calendars: [ { symbol: "calendar-check-o ", url: "###" }, ] } }, { module: "compliments", position: "lower_third", updateInterval: 20000, config: { remoteFile: "custom_complis.json" } }, { module: "currentweather", header: "Aktuelles Wetter", position: "top_right", config: { location: "###", locationID: "2937591", //ID from http://www.openweathermap.org/help/city_list.txt appid: "###", appendLocationNameToHeader: true, degreeLabel: true, showHumidity: true } }, { module: "weatherforecast", position: "top_right", header: "Wettervorhersage", config: { location: "###", locationID: "2937591", //ID from http://www.openweathermap.org/help/city_list.txt appid: "###", appendLocationNameToHeader: true, colored: true, showRainAmount: true } }, { module: "MMM-DHT22", header: "Raumtemperatur", position: "top_right", config: { sensorPIN: 3, updateInterval: 1 // Minutes } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "kicker.de", url: "http://rss.kicker.de/news/fussball" }, { title: "spiegel.de", url: "http://www.spiegel.de/schlagzeilen/tops/index.rss" }, ], showSourceTitle: true, showPublishDate: true, showDescription: true, wrapDescription: false } }, //{ //module: 'MMM-History', //position: 'top_right', //config: { //maxWidth: "300px" // Increase to maximum px or 100% to stretch across mirror. See Examples above. //}, //}, { module: "MMM-SystemStats", position: "top_right", // This can be any of the regions. header: "System Stats", // This is optional classes: "small dimmed", // Add your own styling. Optional. config: { updateInterval: 10000, animationSpeed: 0, align: 'right' // align labels }, }, { module: 'MMM-ip', position: 'top_right', config: { fontSize: 16, showFamily: "IPv4", voice: false } }, { module: 'MMM-MyCommute', position: 'top_left', config: { showHeader: true, headerText: 'Verkehr', apikey: '###', origin: '###', startTime: '05:00', endTime: '20:00', destinations: [ { destination: '###', label: 'Auto zur Arbeit', mode: 'driving', color: '#7D26CD' }, { destination: '###', label: 'Fahrrad zur Arbeit', mode: 'bicycling', color: '#FFB444' }, { destination: '###', label: 'RMV zur Arbeit', mode: 'transit', color: '#FF73D5' } ] } }, /*{ module: 'MMM-Globe', position: 'top_center', config: { style: 'europeDiscNat', imageSize: 300, updateInterval: 10*60*1000 } },*/ { module: 'MMM-SoccerLiveScore', position: 'top_left', header: 'Live-Scores', config: { leagues: [35, 1, 9], showNames: true, showLogos: true, displayTime: 60 * 1000, showTables: true } }, /*{ module: 'MMM-Podcast', config: { feedUrl: 'http://www.tagesschau.de/export/video-podcast/webxl/tagesschau-in-100-sekunden/' } },*/ /*{ module : 'MMM-RandomBackground', position : 'fullscreen_below', // Any region but this one makes the most sense config : { animationSpeed : 4000, updateInterval : 9000 } },*/ { module: 'MMM-Carousel', config: { transitionInterval: 10000, ignoreModules: ['MMM-DHT22'], mode: 'positional', bottom_right: {enabled: true, ignoreModules: [], overrideTransitionInterval: 10000}, } } ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;}
-
@beck0r
And still, without the additional comma, your magicmirror rejects the config? -
Yes… I am trying to uncomment the MMM-History area. With that area not included MM starts (still throwing errors messages but it works). Akismet won’t let me change my post :)