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 251.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.
    • R Offline
      RushHour99
      last edited by

      @sdetweil

      I ran your raspberry.sh install script on a Raspberry Pi Zero W yesterday. I started with a fresh install of Rasbian. The script completed with some warnings, but the Magic Mirror started and seems to be running OK. What does this error mean? Should I try to fix it even though MagicMirror seems to be running OK?

      The errored log file was located at /home/pi/.npm/_logs/2020-04-14T22_35_02_257Z-debug.log

      Here is the snippet from the end:

      10077 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
      10078 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
      10079 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
      10079 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
      10079 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
      10079 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: arm
      10080 verbose stack Error: electron-chromedriver@6.0.0 install: `node ./download-chromedriver.js`
      10080 verbose stack Exit status 1
      10080 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
      10080 verbose stack     at EventEmitter.emit (events.js:189:13)
      10080 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
      10080 verbose stack     at ChildProcess.emit (events.js:189:13)
      10080 verbose stack     at maybeClose (internal/child_process.js:970:16)
      10080 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
      10081 verbose pkgid electron-chromedriver@6.0.0
      10082 verbose cwd /home/pi/MagicMirror
      10083 verbose Linux 4.19.97+
      10084 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "install" "eslint"
      10085 verbose node v10.15.2
      10086 verbose npm  v6.14.4
      10087 error code ELIFECYCLE
      10088 error errno 1
      10089 error electron-chromedriver@6.0.0 install: `node ./download-chromedriver.js`
      10089 error Exit status 1
      10090 error Failed at the electron-chromedriver@6.0.0 install script.
      10090 error This is probably not a problem with npm. There is likely additional logging output above.
      10091 verbose exit [ 1, true ]
      

      install.log:

      install starting  - Tue Apr 14 17:54:46 EDT 2020
      installing on armv6l processor system
      the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
      Updating packages ...
      Hit:1 http://archive.raspberrypi.org/debian buster InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Reading package lists...
      apt-get update  completed ok
      apt-get upgrade  started
      apt upgrade result =rc=0 Reading package lists...
      Building dependency tree...
      Reading state information...
      Calculating upgrade...
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      Installing helper tools ...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      build-essential is already the newest version (12.6).
      curl is already the newest version (7.64.0-4+deb10u1).
      git is already the newest version (1:2.20.1-2+deb10u1).
      unzip is already the newest version (6.0-23+deb10u1).
      wget is already the newest version (1.20.1-1.1).
      wget set to manually installed.
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      Check current Node installation ...
      Node currently installed. Checking version number.
      Minimum Node version: v10.1.0
      Installed Node version: v10.15.2
      No Node.js upgrade necessary.
      Check current NPM installation ...
      NPM currently installed. Checking version number.
      Minimum npm version: V6.0.0
      Installed npm version: V5.8.0
      npm should be upgraded.
      Installing npm ...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      npm is already the newest version (5.8.0+ds6-4).
      npm set to manually installed.
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      upgrading npm to latest
      /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
      /usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
      + npm@6.14.4
      added 435 packages from 869 contributors in 416.088s
      npm installation Done! version=V6.14.4
      Cloning MagicMirror ...
      Cloning MagicMirror Done!
      package.json update for armv6l completed ok
      Installing dependencies ...
      
      > electron-chromedriver@6.0.0 install /home/pi/MagicMirror/node_modules/electron-chromedriver
      > node ./download-chromedriver.js
      
      Dependencies installation Done!
      setting up initial config.js
      Check plymouth installation ...
      Splashscreen: Checking themes directory.
      Splashscreen: Create theme directory if not exists.
      Splashscreen: Changed theme to MagicMirror successfully.
      install and setup pm2
      pm2 not installed, installing
      pm2 install result npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) /usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2 /usr/local/bin/pm2-dev -> /usr/local/lib/node_modules/pm2/bin/pm2-dev /usr/local/bin/pm2-docker -> /usr/local/lib/node_modules/pm2/bin/pm2-docker /usr/local/bin/pm2-runtime -> /usr/local/lib/node_modules/pm2/bin/pm2-runtime npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/pm2/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) + pm2@4.2.3 added 206 packages from 202 contributors in 240.179s
      get the pm2 platform specific startup command
      startup command = sudo env PATH=$PATH:/usr/bin:/bin /usr/local/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
      
                              -------------
      
      __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
       _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
        _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
         _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
          _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
           _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
            _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
             _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
              _\///______________\///______________\///__\///////////////__
      
      
                                Runtime Edition
      
              PM2 is a Production Process Manager for Node.js applications
                           with a built-in Load Balancer.
      
                      Start and Daemonize any application:
                      $ pm2 start app.js
      
                      Load Balance 4 instances of api.js:
                      $ pm2 start api.js -i 4
      
                      Monitor in production:
                      $ pm2 monitor
      
                      Make pm2 auto-boot at server restart:
                      $ pm2 startup
      
                      To go further checkout:
                      http://pm2.io/
      
      
                              -------------
      
      [PM2] Init System found: systemd
      Platform systemd
      Template
      [Unit]
      Description=PM2 process manager
      Documentation=https://pm2.keymetrics.io/
      After=network.target
      
      [Service]
      Type=forking
      User=pi
      LimitNOFILE=infinity
      LimitNPROC=infinity
      LimitCORE=infinity
      Environment=PATH=$PATH:/usr/bin:/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
      Environment=PM2_HOME=/home/pi/.pm2
      PIDFile=/home/pi/.pm2/pm2.pid
      Restart=on-failure
      
      ExecStart=/usr/local/lib/node_modules/pm2/bin/pm2 resurrect
      ExecReload=/usr/local/lib/node_modules/pm2/bin/pm2 reload all
      ExecStop=/usr/local/lib/node_modules/pm2/bin/pm2 kill
      
      [Install]
      WantedBy=multi-user.target
      
      Target path
      /etc/systemd/system/pm2-pi.service
      Command list
      [ 'systemctl enable pm2-pi' ]
      [PM2] Writing init configuration in /etc/systemd/system/pm2-pi.service
      [PM2] Making script booting at startup...
      [PM2] [-] Executing: systemctl enable pm2-pi...
      [PM2] [v] Command successfully executed.
      +---------------------------------------+
      [PM2] Freeze a process list on reboot via:
      $ pm2 save
      
      [PM2] Remove init script via:
      $ pm2 unstartup systemd
      pm2 startup command done
      configure the pm2 config file for MagicMirror
      start MagicMirror via pm2 now
      save MagicMirror pm2 config now
      disable screensaver via gsettings was true and uint32 300
      disable screensaver via lightdm.conf
      disable screensaver via lxsession
      We're ready! Run pm2 start MagicMirror from the ~/MagicMirror directory to start your MagicMirror.
      install completed - Tue Apr 14 19:02:54 EDT 2020
      
      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @RushHour99
        last edited by

        @RushHour99 that error is because some of the components used for the automated testing aren’t found. It’s ok.

        I need to recheck. I thought I had disabled trying to load those parts.

        All looks good

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil Thanks for the reply. Magic Mirror does appear to be working just fine on my Pi Zero W. I only ran the install script. Should I run the upgrade script too?

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @RushHour99
            last edited by sdetweil

            @RushHour99 no. Upgrade is for every 3 months when the next release comes out. the scripts are only for MagicMirror… not the base OS, or any modules.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @sdetweil
              last edited by sdetweil

              @RushHour99 looks like something changed between April 11 and April 15 in the npm tree, as it skipped the electron-chromdriver on the 11th and tries to install it today. is IS because of the specton library that is in the DEV tree, which i request to be skipped with --only=prod

              so much fun…
              I opened an issue against the scripts
              https://github.com/sdetweil/MagicMirror_scripts/issues/5
              to track it

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 1
              • Mykle1M Offline
                Mykle1 Project Sponsor Module Developer @sdetweil
                last edited by

                @sdetweil said in Installing on a Pi Zero:

                my intent is to submit this new installer to replace the project version…

                I second the motion. :thumbsup:

                Create a working config
                How to add modules

                S 2 Replies Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @Mykle1
                  last edited by sdetweil

                  @RushHour99 looks like something changed between April 11 and April 15 in the npm tree, as it skipped the electron-chromdriver on the 11th and tries to install it today. is IS because of the specton library that is in the DEV tree, which i request to be skipped with --only=prod

                  so much fun…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @Mykle1
                    last edited by

                    @Mykle1 yeh, they updated the repo version in 2.10, and were completely removed in 2.11 to an outside repo…

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • N Offline
                      naked-head
                      last edited by

                      I got a new Pi Zero W, so I start a fresh install with a raspbian lite stretch (2019-04-08 version) but I got this error:

                      > electron-chromedriver@6.0.0 install /home/pi/MagicMirror/node_modules/electron-chromedriver
                      > node ./download-chromedriver.js
                      
                      /home/pi/MagicMirror/node_modules/electron-chromedriver/download-chromedriver.js:19
                        if (err != null) throw err
                                         ^
                      
                      Error: Failed to find Electron v6.0.0 for linux-armv6l at https://github.com/electron/electron/releases/download/v6.0.0/chromedriver-v6.0.0-linux-armv6l.zip
                      

                      searching on electron: https://github.com/electron/electron/releases/tag/v6.0.0 I can’t find armv6 version.

                      Whats the problem?
                      my pi is too old?
                      I got the wrong raspbian version?
                      thanks

                      qu1queQ S 2 Replies Last reply Reply Quote 0
                      • qu1queQ Offline
                        qu1que Project Sponsor @naked-head
                        last edited by

                        @naked-head

                        I think electron is discontinued for raspberry pi zero, a few months ago I see a post in this forum talking about that. Now I can’t find that post.

                        1 Reply Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @naked-head
                          last edited by sdetweil

                          @naked-head did you use the automated installer? it handles this issue…
                          electron is no longer available for the armv6l devices, and the default, manual npm install) will leave nothing installed…

                          there is a side effect bug with npm… when my script runs, I request only the components needed for execution not for automated test, and the chromedriver is only used for automated testing… but npm didn’t pass on my request for only prod to sub modules…

                          it causes no harm, other than that message

                          you will have to run in split mode (serveronly + chromium-browser to view)…

                          there are a bunch of tricky setup things… I suggest using the installer script
                          also, lite does not include the graphical desktop, which is required, unless u intend to run headless

                          see the installer script here
                          https://github.com/sdetweil/MagicMirror_scripts

                          all extra scripts were removed in 2.11, but referenced as ‘alternative’ install options…
                          in the online doc

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          1 Reply Last reply Reply Quote 1
                          • N Offline
                            naked-head
                            last edited by

                            I used this script: https://github.com/ac2799/MagicMirrorPi0Installer following his guide.
                            I’ll try the script you suggest.
                            Thanks a lot

                            1 Reply Last reply Reply Quote 0
                            • N Offline
                              naked-head
                              last edited by

                              That’s work!!!
                              And now the poor Pi Zero W had to do a lot of work :face_screaming_in_fear:

                              S 1 Reply Last reply Reply Quote 0
                              • S Do not disturb
                                sdetweil @naked-head
                                last edited by

                                @naked-head said in Installing on a Pi Zero:

                                And now the poor Pi Zero W had to do a lot of work

                                yes, it is only a pi0… !!

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                1 Reply Last reply Reply Quote 0
                                • K Offline
                                  KNERD
                                  last edited by

                                  It seems this (the script OP posted) needs to be updated. I just tried this on the Raspberry Pi OS (based on Debian 10 “Buster”).
                                  It failed. I believe mostly because npm kept reporting warnings about not supporting nodejs version 10, and errors about could not load, or missing requirements not installed.

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Do not disturb
                                    sdetweil @KNERD
                                    last edited by

                                    @KNERD yes, please use mine. I support and test with it
                                    see
                                    https://github.com/sdetweil/MagicMirror_scripts

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

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

                                      @sdetweil I just tried yours, and it failed also. npm also threw out some warnings and errors. The last line from the CLI states “Unable to install dependencies”

                                      Update on sdetweil script:

                                      I see why now it failed. It seems my pi ZeroW has issue with the Wi-Fi becoming unresponsive. I have to end up turning it on and off.

                                      I will try running it again

                                      Update 2: the WI-Fi became unresponsive again. I guess I need to go with a regular Pi to get this working. I do not like the performance of the Pi Zero anyway

                                      S 2 Replies Last reply Reply Quote 0
                                      • S Do not disturb
                                        sdetweil @KNERD
                                        last edited by

                                        @KNERD where is the pi0 relative to your router? I did have some trouble like this before I installed a range extender in the office.

                                        I have since gone to Google WiFi mesh and things are much more stable.

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        K 1 Reply Last reply Reply Quote 0
                                        • S Do not disturb
                                          sdetweil @KNERD
                                          last edited by

                                          @KNERD did u try directly w my script from after flashing buster?

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

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

                                            @sdetweil

                                            I have a Linksys Mesh setup here. The nearest point is about 10 feet away.

                                            For trying script, yes it was after flashing. This issue with the Wi-Fi just started recently. The Pi Zero came with a Google AIY 2.0 kit I purchased. I was using that AIY image Google was putting out. I wonder if that is a better image since it was targeted for the Pi Zero and the rest of the kit.

                                            Hmm. Wi-Fi just came back up as I was typing this…and back down

                                            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
                                            • 6
                                            • 7
                                            • 8
                                            • 9
                                            • 5 / 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