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.

    Installing on a Pi Zero

    Scheduled Pinned Locked Moved Troubleshooting
    175 Posts 33 Posters 250.2k Views 33 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.
    • A Offline
      andyc7687 @Big11
      last edited by

      @big11 this goes to my forked repo. Are you booting through to the desktop or to the console?

      B 1 Reply Last reply Reply Quote 0
      • B Offline
        Big11 @andyc7687
        last edited by

        @andyc7687

        so since yesterday i installed many times from Scratch but without success……

        With your script i ran into Troubles with a lot of Errors…

        missing dependencies….

        so i suggest to do more steps after “sudo apt INSTALL --fix-missing” -> “apt UPGRADE --fix-missing” does not work…

        sudo dpkg –configure -a. and.
        sudo apt install -f.
        

        at npm install a lot of Warnings e.g.

        npm WARN grunt-stylelint@0.10.1 requires a peer of stylelint@^9.0.0 but none is installed. You must install peer dependencies yourself.
        npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
        
        added 921 packages from 1366 contributors and audited 2466 packages in 859.404s
        found 8 vulnerabilities (7 low, 1 high)
          run `npm audit fix` to fix them, or `npm audit` for details
        Errors while installing dependencies! (source command: npmc@latest install)
        
        + stylelint@9.9.0
        added 156 packages from 107 contributors, removed 32 packages, updated 99 packages, moved 6 packages and audited 4452 packages in 370.707s
        found 4 vulnerabilities (3 low, 1 high)
          run `npm audit fix` to fix them, or `npm audit` for details
        Errors while installing dependencies! (source command: pm install stylelint@latest)
        
        pi@magicpi:~ $   run `npm audit fix` to fix them, or `npm audit` for details
        npm ERR! code EAUDITNOPJSON
        npm ERR! audit No package.json found: Cannot audit a project without a package.json
        
        npm ERR! A complete log of this run can be found in:
        npm ERR!     /home/pi/.npm/_logs/2019-01-09T07_05_26_138Z-debug.log
        npm ERR! code EAUDITNOPJSON
        npm ERR! audit No package.json found: Cannot audit a project without a package.json
        
        npm ERR! A complete log of this run can be found in:
        npm ERR!     /home/pi/.npm/_logs/2019-01-09T07_05_35_497Z-debug.log
        -bash: run: Kommando nicht gefunden.
        pi@magicpi:~ $ Errors while installing dependencies! (source command: pm install stylelint@latest)
        -bash: Syntaxfehler beim unerwarteten Wort `('
        

        i could fix this with

        "npm audit fix" or "npm audit fix --force" in directory MagicMirror
        

        and then i figured out autostart with PM2 as described in MM-Wiki but…

        it won’t start …

        as done in the guide i created a mm.sh script und configured this for autostart with pm2

        at next start Nothing happens to start MagicMirror localy

        a “pm2 logs mm”

        Shows a loop of “sh run-start.sh”

        |mm       | > magicmirror@2.6.0 start /home/pi/MagicMirror
        0|mm       | > sh run-start.sh
        0|mm       |
        0|mm       |
        0|mm       | > magicmirror@2.6.0 start /home/pi/MagicMirror
        0|mm       | > sh run-start.sh
        0|mm       |
        0|mm       |
        0|mm       | > magicmirror@2.6.0 start /home/pi/MagicMirror
        0|mm       | > sh run-start.sh
        0|mm       |
        0|mm       |
        0|mm       | > magicmirror@2.6.0 start /home/pi/MagicMirror
        0|mm       | > sh run-start.sh
        

        a cat to run-start.sh Shows

        pi@magicpi:~/MagicMirror $ cat run-start.sh
        if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty
                export DISPLAY=:0 # Set by default display
        fi
        electron js/electron.js $1
        

        !!!
        but electron.js isn’t installed

        trying manually install this with

        sudo npm install electron -g
        

        ended again in Error-Messages

        Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/electron/.electron'
        npm ERR! code ELIFECYCLE
        npm ERR! errno 1
        npm ERR! electron@4.0.1 postinstall: `node install.js`
        npm ERR! Exit status 1
        npm ERR!
        npm ERR! Failed at the electron@4.0.1 postinstall script.
        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
        
        npm ERR! A complete log of this run can be found in:
        npm ERR!     /root/.npm/_logs/2019-01-09T09_13_51_893Z-debug.log
        

        so… now i’m giving up for These days….

        does anybody know where my Failure is ??

        Thank you

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          andyc7687 @Big11
          last edited by andyc7687

          @big11 I did a test install today, so I’m really not sure what you are doing.

          You will notice that the missing dependencies are installed in subsequent steps (e.g. there’s a problem with style lint and acorn. This is then fixed (see where it says + stylelint@9.9.0 and + acorn lower down in your warnings).

          This installation is completely different from the MM-Wiki. It does not use sh run-start.sh at all. Therefore there may well be problems.

          Can I ask, are you doing your installation over SSH/Telnet? or on the Pi itself? because you keep mentioning ‘locally’ and I just want to make sure I know what you mean by that.

          Edit: Also, don’t use npm install in sudo; it should be run as the normal user

          B 1 Reply Last reply Reply Quote 0
          • B Offline
            Big11 @andyc7687
            last edited by

            @andyc7687

            as for your Question

            i’m installing over SSH but start it then directly on the Pi0…

            i will i try a new Installation by now…

            normally i don’t run “npm install” as root…
            don’t know if i wrote so…

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              Big11 @Big11
              last edited by

              @big11

              thats my “achievment” from last night…

              pi@raspberrypi:~ $ cd MagicMirror/
              pi@raspberrypi:~/MagicMirror $ npm start
              
              > magicmirror@2.6.0 start /home/pi/MagicMirror
              > sh run-start.sh
              
              run-start.sh: 4: run-start.sh: electron: not found
              npm ERR! file sh
              npm ERR! code ELIFECYCLE
              npm ERR! errno ENOENT
              npm ERR! syscall spawn
              npm ERR! magicmirror@2.6.0 start: `sh run-start.sh`
              npm ERR! spawn ENOENT
              npm ERR!
              npm ERR! Failed at the magicmirror@2.6.0 start script.
              npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
              
              npm ERR! A complete log of this run can be found in:
              npm ERR!     /home/pi/.npm/_logs/2019-01-10T07_11_11_053Z-debug.log
              pi@raspberrypi:~/MagicMirror $
              
              
              
              1 Reply Last reply Reply Quote 0
              • 1 Offline
                12wsx
                last edited by

                finally full success!!:)
                @big11 install directly from raspberry terminal not via ssh.
                After few fresh installation and hundreds errors last time tried install using

                bash -c "$(curl -sL https://raw.githubusercontent.com/ac2799/MagicMirror/master/installers/raspberry.sh)"
                

                from raspberrypi terminal.There were some errors but finally worked.
                if you want, I can make a image of my card and share it.

                B 1 Reply Last reply Reply Quote 0
                • B Offline
                  Big11 @12wsx
                  last edited by

                  @12wsx

                  you made my day…

                  it works…

                  the first differences i encountered was the Installation of electron …
                  this i didn’t found at all the others…

                  and i thought before, that this will be the quest…

                  regarding to the warnings installing npm

                  you could fix that with “npm Audit fix” or “npm Audit fix --force”
                  as suggested…

                  i did this also, so maybe this could be an error too…

                  and if it works but this warnings, who cares…. :-)

                  have a great day…
                  thank you

                  1 Reply Last reply Reply Quote 0
                  • W Offline
                    Wordonroad
                    last edited by

                    Awesome write up. Super helpful!

                    1 Reply Last reply Reply Quote 0
                    • qu1queQ Offline
                      qu1que Project Sponsor
                      last edited by qu1que

                      Thank you very much for this work! The tutorial works perfectly. I just installed it in a rpi zero W. Highly recommended for anyone who wants to install it on this SBC.

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        cdh1001
                        last edited by

                        Many thanks Andrew - worked well for me (other than first step: connecting to wifi with WPA2 needed some minor tweaks.)

                        A 1 Reply Last reply Reply Quote 0
                        • A Offline
                          andyc7687 @cdh1001
                          last edited by

                          @cdh1001 please specify tweaks as they might help others.

                          C 1 Reply Last reply Reply Quote 0
                          • C Offline
                            cdh1001 @andyc7687
                            last edited by

                            @andyc7687 - I needed to delete the line: key_mgmt=WPA-PSK Based on discussions elsewhere I originally tried renaming Key_mgmt to WPA2 and/or changing group=CCMP, but neither of those were necessary for me; simply deleting the line was sufficient.

                            A 1 Reply Last reply Reply Quote 1
                            • A Offline
                              andyc7687 @cdh1001
                              last edited by

                              @cdh1001 thanks, I will amend my guide over the weekend then.

                              1 Reply Last reply Reply Quote 1
                              • S Offline
                                Smolo
                                last edited by

                                Thanks for the script and the hints so far :-)

                                Unfortunately I am really frustrated after x installations. :-( Currently everything is installed the autostart works but chrome says “err_connection_refused”!

                                Does anyone have an idea?

                                Zero W V1.1 / Raspian Desktop / no sudo

                                bheplerB 1 Reply Last reply Reply Quote 0
                                • bheplerB Offline
                                  bhepler Module Developer @Smolo
                                  last edited by

                                  @smolo Some suggestions: First, make sure that some form of IP address is present in the address key. Usually 127.0.0.1, but the IP address of your pi will probably work too. Without that value, the web server has a tendency to freak out.

                                  Second, make sure you are specifying the port in your web call. That one has bitten me a couple times.

                                  Third, I would double-check your IP whitelist in the config.js. Possibly open it up to all connections and attempt to view the magic mirror from another computer. See if the problem is local to the PI Zero or if it is on a deeper level.

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

                                    @bhepler
                                    First, as a supplement the installation is absolute standard except for another VNC server.
                                    Chromium starts automaticly with http://localhost:8080

                                    I have already tested the following constellations before my post.
                                    the local ip (192.168.2.84:8080)
                                    127.0.0.1:8080
                                    localhost:8080

                                    “err_connection_refused”

                                    with https browser fault > “err_address_unreachable”

                                    Other things :…

                                    • ublock is inactive!
                                    • Configuration vom MagicMirror Config:
                                      var config = {
                                      port: 8080,
                                      address: “0.0.0.0”,
                                      ipWhitelist: [],
                                    • Test from another pc > “err_connection_refused”
                                    1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      Smolo
                                      last edited by Smolo

                                      I’ve solved the problem and it’s going crazy. After I tried with a portscanner to find out if there is anything running I found out that there is no port 8080 open.

                                      If somebody has problems checking the logs via "pm2 logs MagicMirror --lines 1000

                                      I missed the npm module “moment” under “/home/pi/MagicMirror/node_modules/moment”!!!:astonished_face:

                                      Go to MagicMirror > “npm install” the problem was solved!:slightly_smiling_face:

                                      1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        AnalogCHeep
                                        last edited by

                                        @andyc7687, thanks a lot! It will be easy for me now, I planned going for building a device like yours
                                        Regards

                                        A 1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          andyc7687 @AnalogCHeep
                                          last edited by

                                          @analogcheep thanks, let me know if yours works and upvote if it is helpful!

                                          1 Reply Last reply Reply Quote 0
                                          • 1 Offline
                                            12wsx
                                            last edited by

                                            today i have to reinstall MM and I have some small problem. MM do not show on local hdmi outpul- I can see the dektop but no MM. Server is working properly because when I open it from laptop i can see MM, when I connect to raspberry pi via vnc i can see to MM. What is going on? what i miss?

                                            S 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 8
                                            • 9
                                            • 2 / 9
                                            • 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