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 36.5k 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 Offline
      sdetweil @mumblebaj
      last edited by

      @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 kusselinK 3 Replies Last reply Reply Quote 0
      • M Offline
        MacG @sdetweil
        last edited by

        @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 Offline
          sdetweil @sdetweil
          last edited by

          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
          • L Offline
            levon @sdetweil
            last edited by

            @sdetweil @mumblebaj Thank you two for helping me solve this problem after the last update - I spent a LOT of time looking for the solution that you two helped me (the grep made it easier to find the right modules), the two commands were what fixed it.

            Will I have to do this again with the next update?

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

              @levon maybe. but if you use my upgrade script, it will do the fixes for you

              see
              https://github.com/sdetweil/MagicMirror_scripts

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              L A 2 Replies Last reply Reply Quote 0
              • L Offline
                levon @sdetweil
                last edited by

                @sdetweil Thanks … I will give this a try next time I’m updating. I thought I had tried it before, but perhaps not. I appreciate you sharing this.

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Arena @sdetweil
                  last edited by

                  @sdetweil I did everything as you said, but …

                  [17.12.2021 04:05.03.723] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module ‘request’
                  Require stack:

                  • /home/pi/MagicMirror/modules/MMM-bitcoin/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
                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @Arena
                    last edited by sdetweil

                    @arena and , what is the module/library u need to install?

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    A 1 Reply Last reply Reply Quote 0
                    • A Offline
                      Arena @sdetweil
                      last edited by

                      @sdetweil fiddled all day today and figured out
                      it turned out I did not install or update the dependencies inside the module

                      sorry, thanks

                      1 Reply Last reply Reply Quote 0
                      • kusselinK Offline
                        kusselin @sdetweil
                        last edited by kusselin

                        @sdetweil Hello everyone, I haven’t been here for a while and my Magic Mirror was switched off…after I switched it on again I made updates to the modules via remote…but I still don’t have any display for some modules like Tankerkönig…when I start the Mirror it always says “Modules cannot be loaded”.

                        Now, as described by sdetweil, there are commands that you have to execute in the modules in question…but unfortunately I haven’t quite understood how I have to do this in the right order?

                        It would be really nice if you could explain to me how I have to proceed in order to display the modules again, such as Tankerkönig or mmm-fuel.

                        Thank you very much in advance for your help.

                        Greetings

                        Kussel

                        i don´t understand that here:

                        npm install ???
                        
                        where ??? is the library noted in the message Cannot find module ‘???’
                        
                        | in the example message above, ??? is request
                        
                        to find this message, look in the output of npm start. or if you use pm2 to launch mm do
                        pm2 logs --lines=50
                        

                        how do I proceed exactly?

                        pi@raspberrypi:~/MagicMirror/modules/MMM-Tankerkoenig $ npm init -y
                        Wrote to /home/pi/MagicMirror/modules/MMM-Tankerkoenig/package.json:
                        
                        {
                          "name": "MMM-Tankerkoenig",
                          "version": "1.0.0",
                          "description": "This is a module for the [MagicMirror²](https://github.com/MichMich/MagicMirror/) which displays a fuel prices from [Tankerkoenig](https://www.tankerkoenig.de/).",
                          "main": "MMM-Tankerkoenig.js",
                          "scripts": {
                            "test": "echo \"Error: no test specified\" && exit 1"
                          },
                          "repository": {
                            "type": "git",
                            "url": "git+https://github.com/terenc3/MMM-Tankerkoenig.git"
                          },
                          "keywords": [],
                          "author": "",
                          "license": "ISC",
                          "bugs": {
                            "url": "https://github.com/terenc3/MMM-Tankerkoenig/issues"
                          },
                          "homepage": "https://github.com/terenc3/MMM-Tankerkoenig#readme"
                        
                        
                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 2 / 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