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.

    Looking for Beta-testers!

    Scheduled Pinned Locked Moved MagicMirror
    56 Posts 17 Posters 58.8k Views 18 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.
    • E Offline
      ESOB @morozgrafix
      last edited by ESOB

      @morozgrafix maybe, I issued a pm2 stop and then did a restart and I am no longer getting that error. I am still getting a black only screen with the only error being:

      "ERROR! Could not find main module js file."
      

      What logs should I get you to figure out the reason for lack of display?

      Edit:
      Scratch that, I double checked the logs and I get the same error. I will do a full pi reboot again to triple check but it seems consistent.
      Edit 2:
      After triple check, only one MM instance open and same error noted about port 8080.

      morozgrafixM 2 Replies Last reply Reply Quote 0
      • morozgrafixM Offline
        morozgrafix Moderator @ESOB
        last edited by

        @ESOB did you run npm install after pulling development branch? Next step would be to try to start it in node serveronly mode and point your browser at http://:8080 or run npm start Dev and see if you get any errors in console log of the browser or electron app

        1 Reply Last reply Reply Quote 0
        • morozgrafixM Offline
          morozgrafix Moderator @ESOB
          last edited by morozgrafix

          @ESOB sorry I was replying before you edited post with update. Try temporarily changing your config.js to another port if 8080 is taken for some reason.

          E 1 Reply Last reply Reply Quote 0
          • E Offline
            ESOB @morozgrafix
            last edited by

            @morozgrafix So I tried changing the port number to 8081 and I got this:

            mm-0 (err): WARNING! Could not load config file. Starting with default configuration. Error found: RangeError: "port" argument must be >= 0 and < 65536
            mm-0 (err): App threw an error during load
            mm-0 (err): RangeError: "port" argument must be >= 0 and < 65536
            mm-0 (err):     at assertPort (internal/net.js:17:11)
            mm-0 (err):     at Server.listen (net.js:1371:7)
            mm-0 (err):     at new Server (/home/pi/MagicMirror/js/server.js:20:9)
            mm-0 (err):     at /home/pi/MagicMirror/js/app.js:193:18
            mm-0 (err):     at loadNextModule (/home/pi/MagicMirror/js/app.js:142:5)
            mm-0 (err):     at /home/pi/MagicMirror/js/app.js:137:6
            mm-0 (err):     at Class.loaded (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:19:3)
            mm-0 (err):     at loadModule (/home/pi/MagicMirror/js/app.js:118:6)
            mm-0 (err):     at loadNextModule (/home/pi/MagicMirror/js/app.js:135:5)
            mm-0 (err):     at /home/pi/MagicMirror/js/app.js:137:6
            mm-0 (err): ERROR! Could not find main module js file.
            
            

            I did run npm install, also tried serveronly and running npm start dev but did not gather any additional information. I will say the weird thing is when I leave it on port 8080, the remote control module still loads.

            morozgrafixM 2 Replies Last reply Reply Quote 0
            • morozgrafixM Offline
              morozgrafix Moderator @ESOB
              last edited by morozgrafix

              @ESOB This error WARNING! Could not load config file. seems very odd. Can you please post your config.js file? Also another option is to backup your config.js and do file copy of config.js.sample to config.js to have good known configuration to begin with.

              When starting with npm start dev or node serveronly do you see any errors in the Console Log of the dev tools of the electron or your browser?

              P.S. I wanted to fork this troubleshooting conversation into a separate thread, but can’t seem to find a way.

              1 Reply Last reply Reply Quote 0
              • morozgrafixM Offline
                morozgrafix Moderator
                last edited by

                @roramirez & @MichMich looks like develop branch got broken with this commit https://github.com/MichMich/MagicMirror/commit/354b745c39a19915c3a8547445a5049555bd37ff#diff-75953debd6cf3faf33d4ff10e8353645R11

                Line 11 of defaults.js got this change port: process.env.MM_PORT || 8080, and server is not starting up throwing error in the console log:

                Uncaught ReferenceError: process is not defined
                    at defaults.js:11
                (anonymous) @ defaults.js:11
                
                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  roramirez Core Contributors @morozgrafix
                  last edited by

                  @morozgrafix Yes, it’s a some things I’ve seen a few minutes ago.

                  Already pushed a Hotfix. Its not the most elegant soluction of the world but it work. If there something can be better is welcome ;)

                  Ps: Pull request is https://github.com/MichMich/MagicMirror/pull/676

                  Easy module development with MagicMirror Module Template

                  1 Reply Last reply Reply Quote 1
                  • morozgrafixM Offline
                    morozgrafix Moderator @ESOB
                    last edited by morozgrafix

                    @ESOB Thanks for flagging the issue. @roramirez thanks for the fix

                    1 Reply Last reply Reply Quote 0
                    • MichMichM Offline
                      MichMich Admin
                      last edited by

                      Hotfix Merged! :)

                      1 Reply Last reply Reply Quote 1
                      • justjim1220J Offline
                        justjim1220 Module Developer
                        last edited by

                        I tried this command:
                        git checkout --track origin/develop

                        And got this return:
                        fatal: Not a git repository (or any of the parent directories): .git

                        How do I change to developer mode?

                        "Life's Too Short To Dance With Ugly People"
                        Jim Hallock - 1995

                        strawberry 3.141S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 5 / 6
                        • 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