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.

    How to add modules. For absolute beginners.

    Scheduled Pinned Locked Moved Troubleshooting
    91 Posts 16 Posters 147.0k Views 24 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.
    • T Offline
      TheSij @sdetweil
      last edited by

      @sdetweil - apologies, I was in the wrong directory. This is the terminal response…

      > magicmirror@2.12.0 start /home/pi/MagicMirror
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      [2020-07-27 22:56:11.226] [LOG]    Starting MagicMirror: v2.12.0
      [2020-07-27 22:56:11.233] [LOG]    Loading config ...
      [2020-07-27 22:56:11.238] [LOG]    Loading module helpers ...
      [2020-07-27 22:56:11.240] [LOG]    No helper found for module: alert.
      [2020-07-27 22:56:11.290] [LOG]    Initializing new module helper ...
      [2020-07-27 22:56:11.291] [LOG]    Module helper loaded: updatenotification
      [2020-07-27 22:56:11.291] [LOG]    No helper found for module: clock.
      [2020-07-27 22:56:11.643] [LOG]    Initializing new module helper ...
      [2020-07-27 22:56:11.644] [LOG]    Module helper loaded: calendar
      [2020-07-27 22:56:11.645] [LOG]    No helper found for module: currentweather.
      [2020-07-27 22:56:11.646] [LOG]    No helper found for module: weatherforecast.
      [2020-07-27 22:56:11.678] [LOG]    Initializing new module helper ...
      [2020-07-27 22:56:11.678] [LOG]    Module helper loaded: newsfeed
      [2020-07-27 22:56:11.679] [LOG]    No helper found for module: MMM-TFL.
      [2020-07-27 22:56:11.681] [ERROR]  WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'async'
      Require stack:
      - /home/pi/MagicMirror/modules/MMM-PrayerTime/node_helper.js
      - /home/pi/MagicMirror/js/app.js
      - /home/pi/MagicMirror/js/electron.js
      - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
      - 
      [2020-07-27 22:56:11.682] [LOG]    Loading module helpers ...
      [2020-07-27 22:56:11.683] [LOG]    No helper found for module: alert.
      [2020-07-27 22:56:11.683] [LOG]    Initializing new module helper ...
      [2020-07-27 22:56:11.684] [LOG]    Module helper loaded: updatenotification
      [2020-07-27 22:56:11.684] [LOG]    No helper found for module: clock.
      [2020-07-27 22:56:11.685] [LOG]    Initializing new module helper ...
      [2020-07-27 22:56:11.685] [LOG]    Module helper loaded: calendar
      [2020-07-27 22:56:11.685] [LOG]    No helper found for module: currentweather.
      [2020-07-27 22:56:11.686] [LOG]    No helper found for module: weatherforecast.
      [2020-07-27 22:56:11.686] [LOG]    Initializing new module helper ...
      [2020-07-27 22:56:11.686] [LOG]    Module helper loaded: newsfeed
      [2020-07-27 22:56:11.687] [LOG]    No helper found for module: MMM-TFL.
      [2020-07-27 22:56:11.688] [ERROR]  App threw an error during load
      [2020-07-27 22:56:11.689] [ERROR]  Error: Cannot find module 'async'
      Require stack:
      - /home/pi/MagicMirror/modules/MMM-PrayerTime/node_helper.js
      - /home/pi/MagicMirror/js/app.js
      - /home/pi/MagicMirror/js/electron.js
      - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
      - 
          at Module._resolveFilename (internal/modules/cjs/loader.js:627:15)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
          at Function.Module._load (internal/modules/cjs/loader.js:531:27)
          at Module.require (internal/modules/cjs/loader.js:685:19)
          at require (internal/modules/cjs/helpers.js:16:16)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-PrayerTime/node_helper.js:9:13)
          at Module._compile (internal/modules/cjs/loader.js:786:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
          at Module.load (internal/modules/cjs/loader.js:645:32)
      [2020-07-27 22:56:11.690] [ERROR]  Whoops! There was an uncaught exception...
      [2020-07-27 22:56:11.690] [ERROR]  Error: Cannot find module 'async'
      Require stack:
      - /home/pi/MagicMirror/modules/MMM-PrayerTime/node_helper.js
      - /home/pi/MagicMirror/js/app.js
      - /home/pi/MagicMirror/js/electron.js
      - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
      - 
          at Module._resolveFilename (internal/modules/cjs/loader.js:627:15)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
          at Function.Module._load (internal/modules/cjs/loader.js:531:27)
          at Module.require (internal/modules/cjs/loader.js:685:19)
          at require (internal/modules/cjs/helpers.js:16:16)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-PrayerTime/node_helper.js:9:13)
          at Module._compile (internal/modules/cjs/loader.js:786:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
          at Module.load (internal/modules/cjs/loader.js:645:32) {
        code: 'MODULE_NOT_FOUND',
        requireStack: [
          '/home/pi/MagicMirror/modules/MMM-PrayerTime/node_helper.js',
          '/home/pi/MagicMirror/js/app.js',
          '/home/pi/MagicMirror/js/electron.js',
          '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js',
          undefined
        ]
      }
      [2020-07-27 22:56:11.696] [ERROR]  MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [2020-07-27 22:56:11.697] [ERROR]  If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      [2020-07-27 22:56:11.814] [LOG]    Launching application.
      
      
      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @TheSij
        last edited by sdetweil

        @TheSij said in How to add modules. For absolute beginners.:

        [2020-07-27 22:56:11.690] [ERROR] Error: Cannot find module ‘async’

        i suspect you did not do the required install in the
        MagicMirror/modules/MMM-PrayerTime folder

        per the instructions

        Installation
        Navigate into your MagicMirror's modules folder
        execute git clone https://github.com/slametps/MMM-PrayerTime.git
        
        **if this module does not run correctly,** try npm install async
        
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        T S Mykle1M 3 Replies Last reply Reply Quote 0
        • T Offline
          TheSij @sdetweil
          last edited by

          @sdetweil said in How to add modules. For absolute beginners.:

          I am 110% sure I installed the module in the right directory. I always check before I execute it. I’ve just checked the directory, and the module repository is in the right place. I’m executing the ‘npm install async’ command now. Fingers crossed!

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @TheSij
            last edited by

            @TheSij said in How to add modules. For absolute beginners.:

            I’ve just checked the directory, and the module repository is in the right place.

            what does that mean?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            T 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @sdetweil
              last edited by sdetweil

              I opened an issue on the MMM-PrayerTime module github, for him to create a package.json file for this async dependency and let the system handle it
              https://github.com/slametps/MMM-PrayerTime/issues/43

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              T 1 Reply Last reply Reply Quote 1
              • T Offline
                TheSij @sdetweil
                last edited by

                @sdetweil - as in, the files for that module is in the MM modules folder. Sorry if I’m using the wrong terminology.

                So, after running the ‘npm install async’, it found three low vulnerabilities, which I’ve asked for them to be fixed.

                S 1 Reply Last reply Reply Quote 0
                • T Offline
                  TheSij @sdetweil
                  last edited by

                  @sdetweil - thanks. I think I’ve got it working. The module is finally showing in the MM dashboard. Thanks very much for the guidance, and @Mykle1.

                  Mykle1M 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @TheSij
                    last edited by

                    @TheSij ignore the vulnerabilities, more trouble than its worth

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    T 1 Reply Last reply Reply Quote 0
                    • T Offline
                      TheSij @sdetweil
                      last edited by

                      @sdetweil - too late. Sorry, I went ahead before getting this advice. I’ll remember for next time.

                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @TheSij
                        last edited by

                        @TheSij many times the ‘fixes’ force new code, which breaks old code, so you fix one problem, but the system is dead.

                        more times than not fixing adds new issues to the list, different than u started with. almost NEVER does the list go away.
                        and some of the vulnerabilities matter IF you have your pi connected to the internet where others are interacting with it (logon, save money, messages, …) MM is just pulling update notices. not allowing unsolicited inbound connections…

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        T 1 Reply Last reply Reply Quote 1
                        • T Offline
                          TheSij @sdetweil
                          last edited by

                          @sdetweil - understood. Thanks!

                          1 Reply Last reply Reply Quote 0
                          • Mykle1M Offline
                            Mykle1 Project Sponsor Module Developer @TheSij
                            last edited by

                            @TheSij said in How to add modules. For absolute beginners.:

                            The module is finally showing in the MM dashboard.

                            Ahh, see? Well done. Don’t sweat it. We’ve all experienced these problems. I promise, it gets easier. The more you learn the easier it becomes. Have fun!

                            Create a working config
                            How to add modules

                            1 Reply Last reply Reply Quote 1
                            • Mykle1M Offline
                              Mykle1 Project Sponsor Module Developer @sdetweil
                              last edited by

                              @sdetweil said in How to add modules. For absolute beginners.:

                              i suspect you did not do the required install

                              For the record, I did not have to install dependencies.

                              Create a working config
                              How to add modules

                              S 1 Reply Last reply Reply Quote 0
                              • S Do not disturb
                                sdetweil @Mykle1
                                last edited by sdetweil

                                @Mykle1 because some other module already had. npm install would have resolved that, if he had provided the package. json

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                Mykle1M 1 Reply Last reply Reply Quote 0
                                • Mykle1M Offline
                                  Mykle1 Project Sponsor Module Developer @sdetweil
                                  last edited by Mykle1

                                  @sdetweil said in How to add modules. For absolute beginners.:

                                  npm install would have resolved that, if he had provided the package. json

                                  :thumbsup:

                                  Create a working config
                                  How to add modules

                                  1 Reply Last reply Reply Quote 0
                                  • ebolisaE Offline
                                    ebolisa
                                    last edited by

                                    What if no errors are generated and yet the widget is not shown on the screen? Where do we start troubleshooting?

                                    TIA

                                    Mykle1M S 2 Replies Last reply Reply Quote 0
                                    • Mykle1M Offline
                                      Mykle1 Project Sponsor Module Developer @ebolisa
                                      last edited by Mykle1

                                      @ebolisa said in How to add modules. For absolute beginners.:

                                      What if no errors are generated and yet the widget is not shown on the screen? Where do we start troubleshooting?

                                      It would help if you named the widget (I assume you mean module) and posted your config entry for that module. Please post in a code block.

                                      EDIT:

                                      And everything @sdetweil says. :-)

                                      Create a working config
                                      How to add modules

                                      1 Reply Last reply Reply Quote 0
                                      • S Do not disturb
                                        sdetweil @ebolisa
                                        last edited by

                                        @ebolisa do you have a position defined? must be else MM doesn’t know where to put the content…

                                        next, look in the window where npm start was done, or in the logs if pm2, using pm2 logs --lines=??? ??? is a number 15 default…
                                        also look in the developers window
                                        ctrl-shift-i, select the tab labeled console, and scroll up… u can also filter by module, add some of the unique part of the module name to the filter field

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        1 Reply Last reply Reply Quote 0
                                        • F Offline
                                          fsne04
                                          last edited by fsne04

                                          Hi Mykle1. Thank you for doing this. I am trying to build a MagicMirror for my daughter for Christmas and have had a hard time with a few things. Absolute noobie, but have learned a bunch in the past 2 weeks of this journey.
                                          First question: I installed the Kevinatown MMM-Screencast module and after some trial and error, I did get the module to start, BUT as I am starting the casting from my phone, the Screencast window opens and then freezes stating “loading…” without ever actually starting the video/cast. I assume the config entry is correct, because the screencast opens, but maybe I am missing a step?
                                          Your help would be greatly appreciated! ![1_1608396591977_2020-12-19-103618_1024x768_scrot.png](Uploading 100%) ![0_1608396591974_2020-12-19-103955_1024x768_scrot.png](Uploading 100%)

                                          I guess the screenshots did not work. How do I send a screenshot?

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Do not disturb
                                            sdetweil @fsne04
                                            last edited by

                                            @fsne04 said in How to add modules. For absolute beginners.:

                                            I guess the screenshots did not work. How do I send a screenshot?

                                            click the button above the editor that looks like the sun over the mountain, with top right corner folded over

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            1 Reply Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 3 / 5
                                            • First post
                                              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