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

Electron failed to install correctly

Scheduled Pinned Locked Moved Troubleshooting
9 Posts 5 Posters 10.9k Views 5 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
    spikeboybebop
    last edited by Aug 27, 2017, 4:14 AM

    this is the second time i ran into this problem. I couldn’t find anything online for help so I thought I reformat and start over from scratch. but it happen again so it seems like theirs a general error when it comes to the electron file. I followed the step by step guide to installing the magic mirror but when do the final step and start the program I get the following.

    magicmirror@2.1.2 start /home/pi/MagicMirror
    sh run-start.sh

    /home/pi/MagicMirror/node_modules/electron/index.js:9
    throw new Error(‘Electron failed to install correctly, please delete node_modules/electron and try installing again’)
    ^

    Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
    at Object. (/home/pi/MagicMirror/node_modules/electron/index.js:9:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions…js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object. (/home/pi/MagicMirror/node_modules/electron/cli.js:3:16)
    at Module._compile (module.js:570:32)

    npm ERR! Linux 4.9.45-v7+
    npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “start”
    npm ERR! node v6.11.2
    npm ERR! npm v3.10.10
    npm ERR! code ELIFECYCLE
    npm ERR! magicmirror@2.1.2 start: sh run-start.sh
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the magicmirror@2.1.2 start script ‘sh run-start.sh’.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the magicmirror package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! sh run-start.sh
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR! npm bugs magicmirror
    npm ERR! Or if that isn’t available, you can get their info via:
    npm ERR! npm owner ls magicmirror
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR! /home/pi/MagicMirror/npm-debug.log

    any help would be appropriated and if provided in a simple form because this is the first time ive done anything with a raspberry pi and im not familiar with it.

    S H 2 Replies Last reply Aug 27, 2017, 7:30 AM Reply Quote 0
    • S Offline
      strawberry 3.141 Project Sponsor Module Developer @spikeboybebop
      last edited by Aug 27, 2017, 7:30 AM

      @spikeboybebop did you try this? Error: Electron failed to install correctly, please delete node_modules/electron and try installing again

      Please create a github issue if you need help, so I can keep track

      1 Reply Last reply Reply Quote 0
      • S Offline
        spikeboybebop
        last edited by Aug 27, 2017, 2:33 PM

        So this doesn’t seem very clear. Ive deleted it and try to start magic mirror and I get a black screen. Ive tried to redo the installing of the MM program and nothing changes and no new electron file.

        Ive tried a bunch of different commands for the electron issue from other post. can you be more specific about what I need to install after getting rid of electron?

        also forgot running raspberry pi 3 and the most current OS that is fully up to date.

        S 1 Reply Last reply Aug 27, 2017, 7:16 PM Reply Quote 0
        • S Offline
          strawberry 3.141 Project Sponsor Module Developer @spikeboybebop
          last edited by Aug 27, 2017, 7:16 PM

          @spikeboybebop remove the directory shown in the error and then run npm install in the magicmirror directory

          Please create a github issue if you need help, so I can keep track

          1 Reply Last reply Reply Quote 0
          • H Offline
            HerrB92 @spikeboybebop
            last edited by Aug 27, 2017, 7:30 PM

            @spikeboybebop Hi, maybe my solution posted here may help you: https://forum.magicmirror.builders/topic/2659/black-blank-screen/11

            The main problem (AFAIK) is the need to install and activate a newer version of node.js, as the installation of electron fails with V 6.x.

            The automatic installer only tests on node.js V5.x, so V6.x seems to be fine, but you need node.js V7.x, at least.

            Regards,
            HerrB92

            M 1 Reply Last reply Aug 27, 2017, 7:57 PM Reply Quote 0
            • M Offline
              michaelb42 @HerrB92
              last edited by Aug 27, 2017, 7:57 PM

              @HerrB92 Hm, I just reinstalled stretch on a blank SD and then installed MM using the usual one-liner. Installer updated node to 6.x as usual. Works like a charm.

              pi@mirror:~/MagicMirror $ node -v
              v6.11.2

              Regards,
              michaelb

              H 1 Reply Last reply Aug 27, 2017, 8:19 PM Reply Quote 0
              • H Offline
                HerrB92 @michaelb42
                last edited by Aug 27, 2017, 8:19 PM

                @michaelb42 Mmmh, good to know. Maybe something has been fixed in node.js V6.x or the ZIP package, which was the actual problem on installing electron (and from there it went further down).

                The indicator was that in the electron folder no path.txt file was created (which triggers the above error message).

                It worked like a charm with V7.x (I even tested it from Raspian scratch). Unfortunately, I have no idea, why the installation result differs that much… ;-)

                Regards,
                HerrB

                1 Reply Last reply Reply Quote 0
                • S Offline
                  spikeboybebop
                  last edited by Aug 31, 2017, 9:40 PM

                  Got it to work! I think updating the node is what worked as it was still in version 6. when I did npm install afterwords it added the electron file. I could have sworn I did that before and it didn’t work so maybe it was on my end or the updated node made the difference.

                  MM seems to work except for the weather part which initially just showed a thermostat but now is completely missing, everything else is working. shouldn’t be too difficult to figure out that issuer.

                  Thanks for all the help and speedy response!

                  M 1 Reply Last reply Aug 31, 2017, 9:50 PM Reply Quote 0
                  • M Offline
                    Mykle1 Project Sponsor Module Developer @spikeboybebop
                    last edited by Aug 31, 2017, 9:50 PM

                    @spikeboybebop said in Electron failed to install correctly:

                    MM seems to work except for the weather

                    Weather won’t work without an API key. See the README for that module for instructions on where to go to acquire said API key. Then, enter the API key in the appropriate place in the config entry for that module.

                    Create a working config
                    How to add modules

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    1 / 1
                    • First post
                      1/9
                      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