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.

    Cannot find module "moment"

    Scheduled Pinned Locked Moved Troubleshooting
    98 Posts 2 Posters 45.8k Views 2 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 @uok825
      last edited by

      @uok825 cool… didn’t need to reboot… I would have asked u to check the package.json file start line

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      U 1 Reply Last reply Reply Quote 0
      • U Offline
        uok825 @sdetweil
        last edited by uok825

        @sdetweil
        Now another module give an error

        0|MagicMir | [26.07.2021 00:57.11.255] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'uuid/v4'
        0|MagicMir | [26.07.2021 00:57.11.503] [ERROR] Whoops! There was an uncaught exception...
        0|MagicMir | [26.07.2021 00:57.11.562] [ERROR] { Error: Cannot find module 'uuid/v4'
        0|MagicMir |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
        0|MagicMir |     at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
        0|MagicMir |     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
        0|MagicMir |     at Module.require (internal/modules/cjs/loader.js:692:17)
        0|MagicMir |     at require (internal/modules/cjs/helpers.js:25:18)
        0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/node_modules/request/lib/auth.js:4:12)
        0|MagicMir |     at Module._compile (internal/modules/cjs/loader.js:778:30)
        0|MagicMir |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
        0|MagicMir |     at Module.load (internal/modules/cjs/loader.js:653:32)
        0|MagicMir |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12) code: 'MODULE_NOT_FOUND' }
        0|MagicMir | [26.07.2021 00:57.11.573] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
        0|MagicMir | [26.07.2021 00:57.11.584] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
        
        /home/pi/.pm2/logs/MagicMirror-out.log last 15 lines:
        0|MagicMir | [26.07.2021 00:57.08.308] [LOG] Module helper loaded: newsfeed
        0|MagicMir | [26.07.2021 00:57.11.270] [LOG] Loading module helpers ...
        0|MagicMir | [26.07.2021 00:57.11.284] [LOG] No helper found for module: alert.
        0|MagicMir | [26.07.2021 00:57.11.294] [LOG] Initializing new module helper ...
        0|MagicMir | [26.07.2021 00:57.11.307] [LOG] Module helper loaded: updatenotification
        0|MagicMir | [26.07.2021 00:57.11.316] [LOG] No helper found for module: clock.
        0|MagicMir | [26.07.2021 00:57.11.330] [LOG] Initializing new module helper ...
        0|MagicMir | [26.07.2021 00:57.11.340] [LOG] Module helper loaded: calendar
        0|MagicMir | [26.07.2021 00:57.11.355] [LOG] Initializing new module helper ...
        0|MagicMir | [26.07.2021 00:57.11.361] [LOG] Module helper loaded: currentweather
        0|MagicMir | [26.07.2021 00:57.11.372] [LOG] Initializing new module helper ...
        0|MagicMir | [26.07.2021 00:57.11.382] [LOG] Module helper loaded: weatherforecast
        0|MagicMir | [26.07.2021 00:57.11.396] [LOG] Initializing new module helper ...
        0|MagicMir | [26.07.2021 00:57.11.405] [LOG] Module helper loaded: newsfeed
        0|MagicMir | Starting chromium browser now, have patience, it takes a minute
        
        

        Internet is fine.
        3245614a-1538-4e08-96a3-3ce8e4a04c62-image.png
        Package.json
        483d4e57-6a7a-4ac7-b28a-adfb32b4affb-image.png

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

          @uok825 said in Cannot find module "moment":

          /home/pi/MagicMirror/node_modules/request/lib/auth.js

          looks like a library under request

          cd ~/MagicMirror
          npm install uuid
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

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

            request and any lib that used request was removed in 2.16 as there was a security problem never to be fixed… so module was deprecated (set end of life)

            MagicMirror removed

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              but the internet is working!!

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              U 1 Reply Last reply Reply Quote 0
              • U Offline
                uok825 @sdetweil
                last edited by

                @sdetweil Yeah. I also solved the other Raspberry and I know how to solve it here. We would try less if I don’t realize later. I’m sorry to have been ranting. I’m currently installing Uuid if the problem I will write again. Thanks for your labor Sam.

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

                  @uok825 to shorten the path

                  pm2 stop all

                  then do

                  npm start

                  in the MagicMirror folder
                  alt-spacebar, n to minimize MM
                  then ctrl-c to stop

                  once good, then pm2 status to get the number and
                  pm2 start 0 or whatever number

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  U 1 Reply Last reply Reply Quote 0
                  • U Offline
                    uok825 @sdetweil
                    last edited by uok825

                    @sdetweil I am connected with SSH. I always did pm2 stop 0, pm2 flush, do my work and pm2 start 0. But PI0 is so slow still doing npm :D

                    S 2 Replies Last reply Reply Quote 0
                    • S Offline
                      sdetweil @uok825
                      last edited by

                      @uok825 but don’t need to do pm2 start until its working correctly

                      why do you post screen shots if connected via ssh?/ just copy the text…

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

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

                        @uok825 pm2 calls npm same thing…

                        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
                        • 9
                        • 10
                        • 2 / 10
                        • 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