MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. laruatta
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    L
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 0

    laruatta

    @laruatta

    0
    Reputation
    217
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    laruatta Unfollow Follow

    Latest posts made by laruatta

    • RE: Config File Undeclared 'module'

      Proper image.

      0_1491591194907_Lint Output 4_7_2017.PNG

      posted in Troubleshooting
      L
      laruatta
    • Config File Undeclared 'module'

      I’m not new to programming, but I am certainly new to scripting languages. I’m trying to get the PI to recognize even the sample config file. I’ve linted it and fixed a few syntactical errors, but the linter is stuck on the last line. I’ve included a screenshot of the error messages. Simply because I don’t know JavaScript can anyone explain these errors and how “module” is undefined?

      0_1491591046185_Lint Output 4_7_2017.PNG

      /* 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"], // Set [] to allow all IP addresses.
      
          language: "en",
          timeFormat: 24,
          units: "metric",
      
          module: [
              {
                  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: "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/HomePage.xml"
                          }
                      ],
                      showSourceTitle: true,
                      showPublishDate: true
                  }
              }
          ]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      posted in Troubleshooting
      L
      laruatta