Read the statement by Michael Teeuw here.
Config.js file Syntax
-
@bhepler said in Config.js file Syntax:
@amosh83 - Well, progress. You have a config.js file in the right place and it’s passing the syntax checks.
Maybe I should have paid more attention while reading. I see now that I asked something that you had already established. My bad.
I am extremely curious to see how MM can report
"Please create a config file. See README for more information. If you get this message while your config file is already created, your config file probably contains an error."
when there is a working config in the proper directory. -
@amosh83 Did you post the exact config.js file. If so you’re missing a “/” on the first line.
-
-
@amosh83 said in Config.js file Syntax:
all I was missing was that “/”,
Ahh, you missed when you copied and pasted. That’s fairly common.
are you kidding me???
Now where have I heard this before? Oh yeah, I said it!
Enjoy your mirror
-
I’m having this exact problem, but I’ve used a linter to check for errors and there are none, and my file is in /var/www/html/MagicMirror/config/config.js, I have no idea what I’m doing wrong!
-
@jade said in Config.js file Syntax:
my file is in /var/www/html/MagicMirror/config/config.js,
Your installation of MM belongs as follows, and so the path to your config.js file
pi@raspberry ~/MagicMirror/config/config.js
Then we can work on your config.js if need be
-
@Mykle1 not necessarily, you can install the mirror in every directory you like
-
@strawberry-3.141 … except for directories with different read/write permissions. Not a linux expert, but I guess this includes /var/ in its default status!?
-
I was referring to this forums very own “Complete Setup Tutorial.” Specifically, this:
https://forum.magicmirror.builders/topic/236/complete-setup-tutorial/6I guess I shouldn’t assume that everyone follows the installation procedure.
-
@Mykle1 said in Config.js file Syntax:
Your installation of MM belongs as follows, and so the path to your config.js file
pi@raspberry ~/MagicMirror/config/config.js
When I first started using Linux I was taught the very bad habit of switching to the root user and doing everything as root, so I moved the file into where it needs to be in /home/pi but I still have the same problem
var config = { port: 8080, ipWhitelist: [], language: "en", timeFormat: 24, units: "metric", modules: [ { module: "clock", position: "top_left" }, { module: "calendar", header: "CWG Pi", position: "top_left", config: { calendars: [ { symbol: "calendar-check-o ", url: "https://calendar.google.com/calendar/ical/cwgpi2017%40gmail.com/private-b287e4ebe0e8f5d66665e0c83f9e3fa0/basic.ics" } ] } }, { module: "compliments", position: "lower_third", updateInterval: 3600000, config: { compliments: { morning: [ "Valar Morghulis", "Valar Dohaeris", "When You Play The Game Of Thrones You Win Or You Die", "Where Is The God Of Tits And Wine?" ], afternoon: [ "Sometimes, Those With The Most Power Have The Least Grace", "A Mind Needs Books Like A Sword Needs A Whetstone", "Chaos Isn't A Pit, Chaos Is A Ladder", "A Lion Doesn't Concern Himself With The Opinions Of Sheep" ], evening: [ "The Night Is Dark And Full Of Terrors", "Night Gathers And Now My Watch Begins", "Winter Is Coming", "Power Resides Where Men Believe It Resides. It's A Trick, A Shadow On The Wall, And A Very Small Man Can Cast A Very Large Shadow" ] } } }, { module: "currentweather", position: "top_right", config: { location: "Corby", locationID: "2652381", //ID from http://www.openweathermap.org/help/city_list.txt appid: "39ab36a3fa513354fbe406263f175c07" } } ] };
Everything is ok according to jslint but something has got to be not working. Incidentally if I use the sample file and don’t change anything I have the same problem.