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

How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

Scheduled Pinned Locked Moved Tutorials
raspberry pipi0zeropizeropi1
204 Posts 47 Posters 484.0k Views 47 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
    SebTota @Hawking
    last edited by Sep 2, 2017, 10:05 AM

    @Hawking I get an error saying that modules/color is missing or something like that. I’ve been working on it for 3 days but can’t get it to work.

    H 1 Reply Last reply Sep 2, 2017, 10:33 AM Reply Quote 0
    • H Offline
      Hawking @SebTota
      last edited by Sep 2, 2017, 10:33 AM

      @SebTota

      • Do you also get this error if you use a very minimal config file like
      var config = {
              port: 8080,
              ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
              language: "en",
              timeFormat: 24,
              units: "metric",
              modules: [
                      {
                              module: "clock",
                              position: "top_left"
                      },
              ]
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      

      If this works, you can step by step add the modules you want and see which one causes the problem.

      • The exact error message would be helpful for an analysis.
      S 1 Reply Last reply Sep 2, 2017, 1:35 PM Reply Quote 0
      • S Offline
        SebTota @Hawking
        last edited by Sep 2, 2017, 1:35 PM

        @Hawking
        module.js:339
        throw err;
        ^

        Error: Cannot find module ‘express’
        at Function.Module._resolveFilename (module.js:337:15)
        at Function.Module._load (module.js:287:25)
        at Module.require (module.js:366:17)
        at require (module.js:385:17)
        at Object. (/home/pi/MagicMirror/js/server.js:8:15)
        at Module._compile (module.js:435:26)
        at Object.Module._extensions…js (module.js:442:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:311:12)
        at Module.require (module.js:366:17)

        and then the browser loads and says it cannot find http://localhost:8080

        S 1 Reply Last reply Sep 2, 2017, 1:42 PM Reply Quote 0
        • S Offline
          SebTota @SebTota
          last edited by SebTota Sep 2, 2017, 1:44 PM Sep 2, 2017, 1:42 PM

          @SebTota I went to my old image from before the update and thats still working fine, but when I updated it, it again had the error come up. The only difference is last time I did the update it said Error: Cannot find module ‘colors’

          H 1 Reply Last reply Sep 2, 2017, 1:53 PM Reply Quote 0
          • H Offline
            Hawking @SebTota
            last edited by Hawking Sep 2, 2017, 1:54 PM Sep 2, 2017, 1:53 PM

            @SebTota
            I still don’t understand what update you are referring to.
            Both error messages sound like there are modules missing (either “express” or “colors”).

            What happens if you do

            cd ~/MagicMirror && sudo npm install
            cd ~/MagicMirror/vendor && npm install
            
            S 1 Reply Last reply Sep 2, 2017, 3:01 PM Reply Quote 1
            • S Offline
              SebTota @Hawking
              last edited by Sep 2, 2017, 3:01 PM

              @Hawking My MagicMirror has been sitting for a long time. When I recently finished the frame to get the computer display and rpi zero out of my closet I booted the rpi zero and on the top of the display it said A New Version of Magic Mirror is available or something along those lines. So I went into the MagicMirror folder and used the command “git pull && npm install” as specified in the README file of MagicMirror.

              1 Reply Last reply Reply Quote 0
              • H Offline
                Hawking
                last edited by Sep 2, 2017, 5:50 PM

                @SebTota said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):

                git pull && npm install

                Have there been errors when you did so?

                I got

                npm WARN lifecycle magicmirror@2.1.1~install: cannot run in wd %s %s (wd=%s) magicmirror@2.1.1 cd vendor && npm install /home/me/MagicMirror
                

                Thats why I then did

                cd ~/MagicMirror/vendor && npm install
                

                in addition (see my post above). Maybe this also solves your problem.

                S 1 Reply Last reply Sep 2, 2017, 9:29 PM Reply Quote 0
                • S Offline
                  SebTota @Hawking
                  last edited by Sep 2, 2017, 9:29 PM

                  @Hawking Sorry to keep bothering you but I ended up making it work with the two commands you told me to do. Now my problem is when the Pi Zero W is booting it connects to the WiFi but when magic mirror boots the pi disconnects.

                  H 1 Reply Last reply Sep 2, 2017, 9:53 PM Reply Quote 0
                  • H Offline
                    Hawking @SebTota
                    last edited by Sep 2, 2017, 9:53 PM

                    @SebTota
                    Just to make sure that I understand the problem correctly:
                    You see the MagicMirror on the screen (Clock running etc). but you can no longer connect to the Pi Zero (using eg. ssh)?

                    Just as a test:
                    What happens if you disable the MagicMirror from autostart (for example by moving the MagicMirror start script from /etc/init.d/ to your home directory) and start it manually while you are already logged in? I don’t know your exact setup or your Linux knowledge, if you need further help how to do this, just let me know.

                    S 1 Reply Last reply Sep 3, 2017, 1:00 AM Reply Quote 0
                    • S Offline
                      SebTota @Hawking
                      last edited by Sep 3, 2017, 1:00 AM

                      @Hawking I actually eventually got it working. Thanks so much for all your help!

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 9
                      • 10
                      • 11
                      • 12
                      • 13
                      • 20
                      • 21
                      • 11 / 21
                      11 / 21
                      • First post
                        109/204
                        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