Calendar help - won't post



  • I have been reading posts and trying to figure this out but still haven’t. I also put my config.js into jsHint site but couldn’t figure out the problem. Errors:
    17 Label ‘modules’ on [ statement.
    82 Expected an assignment or function call and instead saw an expression.
    82 Missing semicolon.
    82 Unrecoverable syntax error. (97% scanned).

    I also tried the npm run config:check - got the following response:
    “Your configuration file don’t containt syntax error :)”

    Do I edit my config.js in the config folder or do I edit the calendar.js in the calendar module folder?


  • Module Developer

    @elwarriner said in Calendar help - won’t post:

    Do I edit my config.js in the config folder or do I edit the calendar.js in the calendar module folder?

    You edit the config.js file. It’s not recommended that you edit the calendar.js file… Can you post your config.js file here (in a code block) so we can take a look at it



  • I need to first go back to see how to post it in the code block. In the meantime, where do I find an original calendar.js since that might be my problem. I did edit it. Edited to add - I cut and pasted the calendar.js from: https://github.com/MichMich/MagicMirror/tree/master/modules/default/calendar
    Still not fixed.



  • 		{
    			module: "alert",
    		},
    		{
    			module: "updatenotification",
    			position: "top_bar"
    		},
    		{
    			module: "clock",
    			position: "top_left"
    		},
    		{
    			module: "calendar",
    			header: "calendar",
    			position: "top_left",
    			config: {
            calendars: [
                {
                    url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
                },
                {
                    url: 'https://calendar.google.com/calendar/ical/myinfo%40gmail.com/private-fd97576a307b857ca2b82727302938f7/basic.ics'
                },
    
            ],
        }
    		},
    		{
    			module: "compliments",
    			position: "lower_third"
    		},
    		{
    			module: "currentweather",
    			position: "top_right",
    			config: {
    				location: "New York",
    				locationID: "",  //ID from http://www.openweathermap.org/help/city_list.txt
    				appid: "YOUR_OPENWEATHER_API_KEY"
    			}
    		},
    		{
    			module: "weatherforecast",
    			position: "top_right",
    			header: "Weather Forecast",
    			config: {
    				location: "New York",
    				locationID: "5128581",  //ID from http://www.openweathermap.org/help/city_list.txt
    				appid: "YOUR_OPENWEATHER_API_KEY"
    			}
    		},
    		{
    			module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				feeds: [
    					{
    						title: "New York Times",
    						url: "http://www.nytimes.com/services/xml/rss/nyt/Technology.xml"
    					}
    				],
    				showSourceTitle: true,
    				showPublishDate: true
    			}
    		},
    	]
    
    };```

  • Module Developer

    @elwarriner said in Calendar help - won’t post:

    I need to first go back to see how to post it in the code block. In the meantime, where do I find an original calendar.js since that might be my problem. I did edit it.

    https://github.com/MichMich/MagicMirror/blob/master/modules/default/calendar/calendar.js

    Checking your config now


  • Module Developer

    Ok, so what is the problem. I just used that config and it fired right up. Only Christmas shows on one of your calendars but the config loads without error.

    The only other thing I would suggest is changing the rotateInterval in the config for your newsfeed. The news items change before they fully scroll across your screen. Set it to about 30 seconds so you see the entire item before it goes to the next



  • Thank you. I appreciate the checking. I ended up re-running the install script and it worked. I have no idea but am very happy. Now that I know not to mess with the modules, it is much easier.