• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

code issue

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 3 Posters 1.2k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    cade72
    last edited by yawns Jan 16, 2019, 11:41 AM Jan 16, 2019, 9:41 AM

    i have no clue what is wrong with my code, I am very new and had to restart my pi because i was testing stuff. I put all my changes back in at once(which I now realized was dumb lol) and now it says config error. i tried to use this
    node tests/configs/check_configs.js but this didnt seem to work. here is the code, thanks in advance for the help!

            language: "en",
            timeFormat: 12,
            units: "imperial",
    
            modules: [
                    {
                            module: "alert",
                    },
                    {
                            module: "updatenotification",
                            position: "top_bar"
                    },
                    {
                            module: "clock",
                            position: "top_left"
                            config: {
                                    displaySeconds: false,
                    }
                    },
                    {
                            module: "",
                            header: "US Holidays",
                            position: "top_left",
                            config: {
                                    calendars: [
                                            {
                                                    symbol: "calendar-check",
                                                    url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
                                            }
                                    ]
                            }
                    },
                    {
                            module: "",
                            position: "lower_third"
                    },
     {
                            module: "currentweather",
                            position: "top_right",
                            config: {
                                    onlyTemp: true,
                                    roundTemp: true,
                                    location: "Shawnee",
                                    locationID: "4279247",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
                                    appid: "6272b5d982857a7f9dc98abe37f263f4"
                            }
                    },
                    {
                            module: "weatherforecast",
                            position: "top_right",
                            header: "Weather Forecast",
                            config: {
                                    roundTemp: true,
                                    location: "Shawnee",
                                    locationID: "4279247",  //ID from https://openweathermap.org/city
                                    appid: "6272b5d982857a7f9dc98abe37f263f4"
                            }
                    },
                    {
                            module: "",
                            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;}
    
    C ? 2 Replies Last reply Jan 16, 2019, 9:50 AM Reply Quote 0
    • C Offline
      cade72 @cade72
      last edited by Jan 16, 2019, 9:50 AM

      @cade72

      not sure if this helps but here is what comes up when i put in node tests/configs/check_configs.js

      ~/MagicMirror $ node tests/configs/check_configs.js
      internal/modules/cjs/loader.js:550
      throw err;
      ^

      Error: Cannot find module ‘/home/pi/MagicMirror/tests/configs/check_configs.js’
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
      at Function.Module._load (internal/modules/cjs/loader.js:475:25)
      at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
      at startup (internal/bootstrap/node.js:201:19)
      at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)

      S 1 Reply Last reply Jan 16, 2019, 11:35 AM Reply Quote 0
      • S Away
        sdetweil @cade72
        last edited by Jan 16, 2019, 11:35 AM

        @cade72 said in code issue:

        > node tests/configs/check_configs.js
        

        one too many ‘s’…

        node tests/configs/check_config.js
        

        my error…

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C 1 Reply Last reply Jan 16, 2019, 9:55 PM Reply Quote 0
        • ? Offline
          A Former User @cade72
          last edited by Jan 16, 2019, 11:57 AM

          @cade72 after position of clock, comma is missed.

          C 1 Reply Last reply Jan 16, 2019, 9:58 PM Reply Quote 1
          • C Offline
            cade72 @sdetweil
            last edited by Jan 16, 2019, 9:55 PM

            @sdetweil ohhh all good, I was super confused why it wasnt working. Thanks!

            1 Reply Last reply Reply Quote 0
            • C Offline
              cade72 @Guest
              last edited by Jan 16, 2019, 9:58 PM

              @sean commas always seem to win vs me lol. Thanks!

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                1/6
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy