Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Errors trying to run MM on Pi3

    Troubleshooting
    3
    8
    2572
    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
      Esinem last edited by

      Help! I’m a complete noob trying to go through the installation tutorial. https://forum.magicmirror.builders/topic/236/complete-setup-tutorial/6 but it’s complaining about node install.js I tried updating npm but still get this:

      magicmirror@2.1.3 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.1.3 start: sh run-start.sh
      npm ERR! spawn ENOENT
      npm ERR!
      npm ERR! Failed at the magicmirror@2.1.3 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/2018-01-01T01_22_06_331Z-debug.log

      Any suggestions in extremely plain English very welcome. Thanks and happy New Year.

      bhepler 1 Reply Last reply Reply Quote 0
      • bhepler
        bhepler Project Sponsor @Esinem last edited by bhepler

        @Esinem It seems that you do not have Electron installed on your Pi. If you install electron, it should overcome that error.

        First, go to your home directory: cd ~
        Then install electron: npm install electron@1.4.15
        Once that is complete, try starting the mirror again.

        Good luck!

        NOTE: This won’t work (see below). Instead cd ~/MagicMirror.

        1 Reply Last reply Reply Quote 0
        • E
          Esinem last edited by Esinem

          Thanks but it didn’t seem to work 😞 I tried what you said and then continued with the steps in the tutorial but as you can see it failed. I tried running it again but more errors.

          I’m off to bang my head on a wall! 🙂 I’m quite prepared to believe I’m doing something idiotic as I’m a total Pi/Raspbrian/Python virgin.

          pi@raspberrypi:~ $ magicmirror@2.1.3 start /home/pi/MagicMirror
          bash: magicmirror@2.1.3: command not found
          pi@raspberrypi:~ $ cd MagicMirror/config
          pi@raspberrypi:~/MagicMirror/config $ cp config.js.sample config.js
          pi@raspberrypi:~/MagicMirror/config $ cd $HOME/MagicMirror
          pi@raspberrypi:~/MagicMirror $ npm start

          magicmirror@2.1.3 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.1.3 start: sh run-start.sh
          npm ERR! spawn ENOENT
          npm ERR!
          npm ERR! Failed at the magicmirror@2.1.3 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/2018-01-01T17_47_18_127Z-debug.log
          pi@raspberrypi:~/MagicMirror $ cd ~
          pi@raspberrypi:~ $ npm install electron@1.4.15

          electron@1.4.15 postinstall /home/pi/node_modules/electron
          node install.js

          npm WARN saveError ENOENT: no such file or directory, open ‘/home/pi/package.json’
          npm WARN enoent ENOENT: no such file or directory, open ‘/home/pi/package.json’
          npm WARN pi No description
          npm WARN pi No repository field.
          npm WARN pi No README data
          npm WARN pi No license field.

          • electron@1.4.15
            updated 1 package in 42.487s
            pi@raspberrypi:~ $
          strawberry 3.141 1 Reply Last reply Reply Quote 0
          • strawberry 3.141
            strawberry 3.141 Project Sponsor Module Developer @Esinem last edited by

            @Esinem you installed it in /home/pi instead of /home/pi/MagicMirror

            E 1 Reply Last reply Reply Quote 0
            • E
              Esinem @strawberry 3.141 last edited by

              @strawberry-3.141 Thanks. Isn’t that what I was told to do or am I completely misunderstanding things?

              First, go to your home directory: cd ~
              Then install electron: npm install electron@1.4.15

              I think I need to study some very basic tutorials before I even try to install stuff!

              strawberry 3.141 1 Reply Last reply Reply Quote 0
              • strawberry 3.141
                strawberry 3.141 Project Sponsor Module Developer @Esinem last edited by

                @Esinem its a dependency of magicmirror so it should be installed in the magicmirror directory or globally. Try cd ~/MagicMirror and then the install command again

                1 Reply Last reply Reply Quote 1
                • E
                  Esinem last edited by Esinem

                  Aha! Many thanks. We seem to be getting somewhere now but not out of the woods yet. MM loads, which is a result, and I get a black screen with a little drop-down with options like full screen, properties, session info but no data displayed. Something flashed up fast as it loaded which I think indicated it couldn’t find something. Helper module? I’m not sure it’s relevant as I see some modules don’t have helper files

                  I had errors relating to electron@1.17.10 so tried installing that but no change.

                  Here’s my screen: https://photos.app.goo.gl/4Qbew2OasrjvqhWH2 Doh! Just figured out the drop down is to do with VNC not MM.

                  I ran dev and I can see the line with config.js is highlighted. It tested without syntax errors. I appreciate sample stuff needs localising but should the clone of the sample show something or do I need to make any changes to display anything?

                  E 1 Reply Last reply Reply Quote 0
                  • E
                    Esinem @Esinem last edited by Esinem

                    Hurrah!! I found a post dated 3 days ago by Lange which solved it:

                    npm install --unsafe-perm

                    Thanks for your input.

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    Enjoying MagicMirror? Please consider a donation!
                    MagicMirror created by Michael Teeuw.
                    Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy