Read the statement by Michael Teeuw here.
Config.js issues
-
I am having some issues with the config.js file. When I turn on my pi and the Mirror client loads it tells me to create a config file. Here is the the file (with a few things removed):
/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var config = { port: 8080, language: 'en', timeFormat: 24, units: 'metric', modules: [ { module: 'alert' }, { module: "updatenotification", position: "top_bar" }, { module: 'clock', position: 'top_left' }, { module: 'calendar', header: 'US Holidays', position: 'top_left', config: { calendars: [ { symbol: 'calendar-check-o ', url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics' } ] } }, { module: 'compliments', position: 'lower_third' }, { module: 'currentweather', position: 'top_right', config: { location: 'Bolton', locationID: '2655237' } }, { module: 'weatherforecast', position: 'top_right', header: 'Weather Forecast', config: { location: 'Bolton', locationID: '2655237'``` } }, { module: 'newsfeed', position: 'bottom_bar', config: { feeds: [ { title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" }, // ], showSourceTitle: true, showPublishDate: true } } ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== 'undefined') {module.exports = config;}Please tell me if you find any errors in the code. I can’t find anything online that works.
-
-
@strawberry-3.141 I have removed them but it still doesn’t work. Thank you for helping
-
@MatthewCowell does maybe the removed part you mentioned has syntax errors? you can check it yourself on jshint.com.
is your file called config.js?
-
This is also wrong:
{ title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" }, //Take out the // it’s negating the next bracket…
/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var config = { port: 8080, language: 'en', timeFormat: 24, units: 'metric', modules: [{ module: 'alert' }, { module: "updatenotification", position: "top_bar" }, { module: 'clock', position: 'top_left' }, { module: 'calendar', header: 'US Holidays', position: 'top_left', config: { calendars: [{ symbol: 'calendar-check-o ', url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics' }] } }, { module: 'compliments', position: 'lower_third' }, { module: 'currentweather', position: 'top_right', config: { location: 'Bolton', locationID: '2655237' } }, { module: 'weatherforecast', position: 'top_right', header: 'Weather Forecast', config: { location: 'Bolton', locationID: '2655237' `` ` } }, { module: 'newsfeed', position: 'bottom_bar', config: { feeds: [ { title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" }, ], showSourceTitle: true, showPublishDate: true } } ] }; -
@cowboysdude Still not working. Thank you for the help!
-
Try this: the last one I took out the // but didn’t take out the extra ‘’ strawberry suggested you take out… this one should be working.
/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], language: 'en', timeFormat: 12, units: 'imperial', modules: [ { module: 'alert', }, { module: "updatenotification", position: "top_bar" }, { module: 'clock', position: 'top_left' }, { module: 'calendar', header: 'US Holidays', position: 'top_left', config: { calendars: [{ symbol: 'calendar-check-o ', url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics' }] } }, { module: 'compliments', position: 'lower_third' }, { module: 'weatherforecast', position: 'top_right', header: 'Weather Forecast', config: { location: 'Bolton', locationID: '2655237' } }, { module: 'currentweather', position: 'top_right', config: { location: 'Bolton', locationID: '2655237' } }, { module: 'newsfeed', position: 'bottom_bar', config: { feeds: [ { title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" }, ], showSourceTitle: true, showPublishDate: true } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== 'undefined') {module.exports = config;} -
@cowboysdude I still can’t get it to work. Ill try reinstalling NOOBS and magicmirror and see if it gets any better
-
@MatthewCowell I ran it through a validator and it said no issues and I can’t find any …
Why are you using Noobs? I would install this:
https://www.raspberrypi.org/downloads/raspbian/
When you restart copy your sample config js file to config.js and just make sure it starts…
Once you do that do not delete your sample config file as that is your temp backup…
Once you get it working and you add a module and it works then back up your config.js to something like config.bak that way you always have a working backup…
in terminal window:
cd ~MagicMirror/config
then
cp config.js config.bak
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