• 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.

module not found error loading module in MagicMirror

Scheduled Pinned Locked Moved Solved Troubleshooting
41 Posts 12 Posters 27.0k Views 14 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.
  • S Away
    sdetweil @MacG
    last edited by sdetweil Oct 24, 2021, 6:14 PM Oct 24, 2021, 6:11 PM

    @macg

    where xxx is the library noted in the message cannot find module xxx

    so your message was

     Cannot find module 'request'
    

    so xxx is

    request
    

    just to clarify
    there are MORE libraries not found than just request. so I am trying to teach you all how to read the messages and understand what to do…

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    M 1 Reply Last reply Oct 24, 2021, 6:16 PM Reply Quote 3
    • M Offline
      MacG @sdetweil
      last edited by Oct 24, 2021, 6:16 PM

      @sdetweil Thanks, I will use it that way. MMM-OneTracker has the same “request”. Others had this problem with MMM-DWD-WarnWeather - not me. It is strange.

      S 1 Reply Last reply Oct 24, 2021, 6:21 PM Reply Quote 0
      • S Away
        sdetweil @MacG
        last edited by sdetweil Oct 24, 2021, 6:22 PM Oct 24, 2021, 6:21 PM

        @macg no not strange. the authors didn’t know what they were supposed to do with libs they used. and it ‘worked’ by doing nothing.

        oops, request has a fatal security bug, and the authors decided the amount of work to fix it wasn’t worth the effort, as new libs are out that don’t have the problem.

        so they discontinued it (aka deprecated), mm doesn’t want to drag that security flaw in and took action to move the base code to another lib, and remove the bad one(s)…

        oops now we have lots of old, some unmaintained, modules that used the only copy of the lib and didn’t say so. .(as a dependency in their module’s package.json file)…

        so nobody knows, and it’s gone. oops…

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Oct 26, 2021, 8:19 AM Reply Quote 0
        • S Away
          sdetweil @MacG
          last edited by sdetweil Oct 24, 2021, 6:35 PM Oct 24, 2021, 6:33 PM

          @macg as for the cert error, not the mm code at all

          the certificate authority cert expired and electron didn’t handle it. chromium did

          but we have to upgrade electron to a version that works, and drag along all the other stuff

          libs not found I already explained

          welcome to the world of open source

          in my career at IBM there was one cardinal rule

          never EVER make changes that break existing apps.

          same data in produces the same data out, always.
          u made a mistake?! oops, somehow have to make a DIFFERENT input to get a different output.
          it takes work, and thought and time.
          but developers and customers can work on new value instead of costly rework

          in the new internet world time is critical, so ship, and fix as fast as u can, breaking changes need to be DOCUMENTED. what a relief THAT is for users and customers…!
          and, stuff that can’t keep up will be discarded ‘quickly’…, yeh, sure… hahahaha… customers think that makes their life easier too.

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • M Offline
            MacG @sdetweil
            last edited by Oct 26, 2021, 8:19 AM

            @sdetweil I understand that some authors do not use the current libs. The “strange” referred to the fact that I have no problems with MMM-DWD-WarnWeather, but others have to install the module “request”.

            Open source is both a curse and a blessing. Now everything works again and MM’s layout changes to the clock module were also quickly undone. :slightly_smiling_face:

            S 1 Reply Last reply Oct 26, 2021, 11:56 AM Reply Quote 0
            • S Away
              sdetweil @MacG
              last edited by sdetweil Oct 26, 2021, 11:57 AM Oct 26, 2021, 11:56 AM

              @macg said in fix for black screen in 2.16 and later:

              The “strange” referred to the fact that I have no problems with MMM-DWD-WarnWeather, but others have to install the module “request”.

              did u npm install request in the mm folder, or in a module folder where there was no package.json, the latter ends up putting it in the mm/node_modules, the same as the former

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              M M 2 Replies Last reply Oct 26, 2021, 4:55 PM Reply Quote 1
              • M Offline
                mumblebaj Module Developer @sdetweil
                last edited by mumblebaj Oct 26, 2021, 4:59 PM Oct 26, 2021, 4:55 PM

                Maybe this can help some users.

                The following will search all *.js files in the modules folder for the reference of request. You can then just enter the module folders and install as per @sdetweil suggestion above. The same can be done for the other missing modules.

                grep -r -E '('request')' ~/MagicMirror/modules/*/*.js
                

                or search for multiple problem modules

                grep -r -E '('request') | ('valid-url')' ~/MagicMirror/modules/*/*.js
                

                Produces the following:

                7120d3bc-00c1-42a1-ad16-70ee822268e5-image.png

                Check out my modules at: https://github.com/mumblebaj?tab=repositories

                S 1 Reply Last reply Oct 26, 2021, 6:01 PM Reply Quote 1
                • S Away
                  sdetweil @mumblebaj
                  last edited by Oct 26, 2021, 6:01 PM

                  @mumblebaj and then pull off the module name and scan it’s package.json to see if it’s referenced

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  S L K 3 Replies Last reply Oct 30, 2021, 11:36 PM Reply Quote 0
                  • M Offline
                    MacG @sdetweil
                    last edited by Oct 27, 2021, 8:35 AM

                    @sdetweil said in fix for black screen in 2.16 and later:

                    did u npm install request in the mm folder, or in a module folder where there was no package.json, the latter ends up putting it in the mm/node_modules, the same as the former

                    I installed it the way you suggested. In the two module folders with the addition of package.json (npm init -y) and then npm install request. The MMM-DWD-WarnWeather worked on my mirror from the beginning after updating to MM2.17.

                    1 Reply Last reply Reply Quote 0
                    • S Away
                      sdetweil @sdetweil
                      last edited by Oct 30, 2021, 11:36 PM

                      I enhanced my upgrade script to do all this for all installed modules…

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 1 / 5
                      1 / 5
                      • First post
                        7/41
                        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