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.

    Can't get MM to start, says it can't find electron, then electron won't start

    Scheduled Pinned Locked Moved Troubleshooting
    49 Posts 5 Posters 34.3k Views 4 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.
    • J Offline
      jmartin1009 @bhepler
      last edited by

      @bhepler I am given this error screen

      pi@raspberrypi:~ $ sudo npm install -g electron@2.0.0
      npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ENODATA: Cache input stream was empty
      npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
      npm ERR! code EINTEGRITY
      npm ERR! errno EINTEGRITY
      npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/electron: Integrity verification failed for sha512-MAYuYPYfeCgTfXMl3ioXQAncWDyol9bCAkDBgeNSFemdEJgyOkTSixehWJJTIC9Pc7Ebrgljxn1t3lwm9ae/Bw== (/root/.npm/_cacache/content-v2/sha512/30/06/2e60f61f7828137d7325de2a174009dc583ca897d6c20240c181e35215e99d1098323a44d28b17a1589253202f4f73b11bae0963c67d6dde5c26f5a7bf07)
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /root/.npm/_logs/2019-02-20T01_39_41_726Z-debug.log
      
      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @jmartin1009
        last edited by

        @jmartin1009 MM is trying to install 4.x by default… try 3.0.10

        what version is npm?

        npm -v
        node -v

        npm install electron@3.0.10

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jmartin1009 @sdetweil
          last edited by

          @sdetweil npm is 6.4.1 and node is 10.15.1. When I try to install electron now it just says that my cache input stream is empty. when I tried to get to node modules like @bhepler said, it said no such file or directory, and when I force cleared it gave me a warning message saying “I sure hope you know what you are doing.”

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

            try

            npm init -y
            

            may have to erase the /home/pi/.npm folder

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jmartin1009 @sdetweil
              last edited by

              @sdetweil got this, now what?

              pi@raspberrypi:~ $ npm init -y
              Wrote to /home/pi/package.json:
              
              {
                "name": "pi",
                "version": "1.0.0",
                "description": "",
                "main": "index.js",
                "dependencies": {},
                "devDependencies": {},
                "scripts": {
                  "test": "echo \"Error: no test specified\" && exit 1"
                },
                "keywords": [],
                "author": "",
                "license": "ISC"
              }
              
              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil
                last edited by

                now change to MagicMirror folder and try the install for electron@3.0.10

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                J 2 Replies Last reply Reply Quote -1
                • J Offline
                  jmartin1009 @sdetweil
                  last edited by

                  @sdetweil the pi reboots and then I change to magicmirror folder and try to start magic mirror and it still says it can’t find electron for some reason :/

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    jmartin1009 @sdetweil
                    last edited by

                    @sdetweil it also says that “local package.json exists, but node_modules is missing, did you mean to install?”

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @jmartin1009
                      last edited by

                      @jmartin1009 yes

                      npm install
                      

                      and if you still have electron missing, then try to

                      npm install electron@3.0.10
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        jmartin1009 @sdetweil
                        last edited by

                        @sdetweil do I do npm install in pi or magic mirror?

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdetweil @jmartin1009
                          last edited by

                          @jmartin1009 magigcmirror… u are installing the dependencies for that app

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          J 1 Reply Last reply Reply Quote 0
                          • J Offline
                            jmartin1009 @sdetweil
                            last edited by

                            @sdetweil still says

                            electron: not found
                            

                            Could this be because it says that node_modules is missing? I did both npm install and npm install electron@3.0.10 in MagicMirror.

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @jmartin1009
                              last edited by

                              @jmartin1009 npm install from inside the magicmirror folder should have created node_modules (thats its (npm) job)

                              erase MagicMirror folder,
                              download again
                              and then cd MagicMirror and then npm install

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              J 1 Reply Last reply Reply Quote 0
                              • J Offline
                                jmartin1009 @sdetweil
                                last edited by

                                @sdetweil another error, it says

                                npm ERR! file /home/pi/MagicMirror/package.json
                                npm ERR! code EJSONPARSE
                                npm ERR! JSON.parse Failed to parse json
                                npm ERR! JSON.parse Unexpected end of JSON input while parsing near ' '
                                npm ERR! JSON.parse Failed to parse package. json data.
                                npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
                                
                                S 1 Reply Last reply Reply Quote 0
                                • S Offline
                                  sdetweil @jmartin1009
                                  last edited by

                                  @jmartin1009 did u download the MagicMirror folder over again?

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  J 1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    jmartin1009 @sdetweil
                                    last edited by

                                    @sdetweil yes I deleted the contents of the old folder and changed the name and redownloaded MagicMirror

                                    S 1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      sdetweil @jmartin1009
                                      last edited by

                                      @jmartin1009 ok, from the /home/pi folder lets start again

                                      cd ~
                                      
                                      rm -rf whatever_the_old_folder_name_is
                                      rm -rf MagicMirror
                                      
                                      git clone https://github.com/MichMich/MagicMirror.git
                                      
                                      cd MagicMirror
                                      npm install
                                      

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      J 1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        jmartin1009 @sdetweil
                                        last edited by

                                        @sdetweil okay I did all of that and it said it cloned and everthing, and then it rebooted during the install, now what? lol

                                        S 1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          sdetweil @jmartin1009
                                          last edited by

                                          @jmartin1009 should not reboot

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          J 1 Reply Last reply Reply Quote 0
                                          • J Offline
                                            jmartin1009 @sdetweil
                                            last edited by

                                            @sdetweil oh it reboots everytime I install magicmirror, how do I prevent this? because it always reboots like 1/3 of the way through the progress bar and it always did it so I thought it was normal lol can I stop this? I have a pi 3+ btw

                                            J 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
                                            • 1 / 3
                                            • 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