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

Clean installation... fails left and right

Scheduled Pinned Locked Moved Bug Hunt
17 Posts 6 Posters 5.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.
  • D Offline
    devinhedge
    last edited by Dec 31, 2018, 10:54 PM

    I don’t even know where to begin with this one.

    Not to be snarky… really… I’m concerned that MagicMirror isn’t being maintained. During installation there are a lot of deprecated node.js module warnings, and security warnings…

    audited 379 packages in 12.599s
    found 12 vulnerabilities (5 low, 5 moderate, 2 high)
    

    and when I finally resolve most of them, I get the following:

    pi@mirrorpi:~/MagicMirror $ npm start
    
    > magicmirror@2.5.0 start /home/pi/MagicMirror
    > sh run-start.sh
    
    /home/pi/MagicMirror/node_modules/electron/index.js:14
        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 getElectronPath (/home/pi/MagicMirror/node_modules/electron/index.js:14:11)
        at Object.<anonymous> (/home/pi/MagicMirror/node_modules/electron/index.js:18:18)
        at Module._compile (internal/modules/cjs/loader.js:689:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
        at Module.load (internal/modules/cjs/loader.js:599:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
        at Function.Module._load (internal/modules/cjs/loader.js:530:3)
        at Module.require (internal/modules/cjs/loader.js:637:17)
        at require (internal/modules/cjs/helpers.js:22:18)
        at Object.<anonymous> (/home/pi/MagicMirror/node_modules/electron/cli.js:3:16)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! magicmirror@2.5.0 start: `sh run-start.sh`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the magicmirror@2.5.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/2018-12-31T22_44_48_657Z-debug.log
    

    So…

    1. Do I work to help fix this? I really don’t have time.
    2. Do I help someone fix this?
    3. Do I dump MagicMirror?
    4. Other?

    Mind you… I’m installing from scratch after the last set of updates caused the machine to have a stack overflow and randomly lock up. This is likely an Electron or node.js issue. Installing from scratch already has me upset.

    Config info:

    1. RasPi 3b+
    2. 8GB SD card
    3. Running on Rasbian Stretch Lite
    4. Attempting to run using sample config.js
    5. No other installed modules at this point
    6. Attempting to run as either server/client or server only
    M B M 3 Replies Last reply Dec 31, 2018, 11:35 PM Reply Quote 0
    • M Offline
      Mykle1 Project Sponsor Module Developer @devinhedge
      last edited by Mykle1 Dec 31, 2018, 11:37 PM Dec 31, 2018, 11:35 PM

      @devinhedge said in Clean installation... fails left and right:

      ‘Electron failed to install correctly, please delete node_modules/electron and try installing again’

      It can be frustrating. I think you would be missing out if you abandoned MM at this point. I dare say that the members here can get you up and running. I would address the last error first, the one I quoted.

      1. Go to your MagicMirror/node_modules folder and delete the electron folder.

      2. In your terminal, go to your MagicMirror directory and run npm install.

      This will install electron (we hope) and very likely be the end of your troubles.

      Run npm start in your MagicMirror directory.

      This should start your mirror. Good luck. Report back.

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 1
      • D Offline
        devinhedge
        last edited by Jan 1, 2019, 2:39 AM

        Thanks for talking me off the ledge. I uninstalled electron. Then I deleted the electron folder. Then I ran npm install again. I received several warnings but the installation completed.

        Here is the result.

        pi@mirrorpi:~/MagicMirror $ npm start
        
        > magicmirror@2.5.0 start /home/pi/MagicMirror
        > sh run-start.sh
        
        /home/pi/MagicMirror/node_modules/electron/dist/electron: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.27' not found (required by /home/pi/MagicMirror/node_modules/electron/dist/electron)
        npm ERR! code ELIFECYCLE
        npm ERR! errno 1
        npm ERR! magicmirror@2.5.0 start: `sh run-start.sh`
        npm ERR! Exit status 1
        npm ERR! 
        npm ERR! Failed at the magicmirror@2.5.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-01T02_28_54_363Z-debug.log
        
        

        [0_1546310061028_2019-01-01T02_28_54_363Z-debug.log](Uploading 100%)

        M 1 Reply Last reply Jan 1, 2019, 2:51 AM Reply Quote 0
        • M Offline
          Mykle1 Project Sponsor Module Developer @devinhedge
          last edited by Jan 1, 2019, 2:51 AM

          @devinhedge

          Ok, so now you’re missing a library:

          /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.27’ not found (required by /home/pi/MagicMirror/node_modules/electron/dist/electron)

          I don’t know where you would acquire that specific file. You could try running npm install in the MagicMirror directory again. I know, that seems silly but it might work. It can’t hurt anything. Otherwise, I’m sure someone else will jump in here and help

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • B Offline
            bhepler Module Developer @devinhedge
            last edited by bhepler Jan 2, 2019, 4:31 AM Jan 2, 2019, 4:25 AM

            @devinhedge said in Clean installation... fails left and right:

            Config info:

            RasPi 3b+
            8GB SD card
            Running on Rasbian Stretch Lite
            Attempting to run using sample config.js
            No other installed modules at this point
            Attempting to run as either server/client or server only

            Well, I think I’ve detected your problem. From the GitHub page for the Magic Mirror project:

            Note that you will need to install the latest full version of Raspbian, don’t use the Lite version.

            So. My advice is to pull your SD card and flash the full desktop version of Raspbian Stretch. I don’t think you need the “recommended software” version, but you do need the desktop.

            Edited to add: It seems others have similar problems with the latest version of Raspian. Apparently they changed something in the base images. Anyhow, follow this advice and you should be able to get back on track.

            1 Reply Last reply Reply Quote 1
            • M Offline
              MichMich Admin @devinhedge
              last edited by Jan 2, 2019, 2:22 PM

              @devinhedge said in Clean installation... fails left and right:

              Not to be snarky… really… I’m concerned that MagicMirror isn’t being maintained. During installation there are a lot of deprecated node.js module warnings, and security warnings…

              As others have said, most of your problems are because you use Raspbian Lite.

              That being said: you have a point. The auto installer script isn’t maintained as well as I want it to be. Due to the fast development speed of Raspbian, it runs into issues. Since most of the contributors don’t install the core from scratch very often, we don’t run into these issues.

              I’m considering deprecating the automatic installer and suggesting to manual install Node, clone MagicMirror and then run npm install. To be fair: that’s how I install my MagicMirror.

              Of course, PR’s to fix the auto-installer are more than welcome!

              1 Reply Last reply Reply Quote 1
              • D Offline
                dazza120
                last edited by dazza120 Jan 2, 2019, 2:37 PM Jan 2, 2019, 2:36 PM

                Yep I tried lite on my Pi 3B+ but it doesn’t work, Stretch desktop works, but think I had to go for the full package ie all the bloat ware, I’ve uninstalled all the rubbish now, but it’s not really an issue for me as I’m running my Pi off of an SSD so no sd card size limit/price, PS I think from what I remember I had to do a manual install and then install PM2 as it didn’t boot MM after reboot

                1 Reply Last reply Reply Quote 0
                • S Offline
                  shbatm Module Developer
                  last edited by shbatm Jan 2, 2019, 6:57 PM Jan 2, 2019, 6:15 PM

                  I’m seeing issues with the newest “Raspbian Stretch with desktop image” (Nov 2018–non-bloatware) as well – I did a fresh, manual installation, no errors, but electron will not start with the OpenGL driver (full KMS or fake KMS) enabled. It runs through everything fine on npm start but then just stalls at “Launching application.” If I disable OpenGL, it works fine.

                  Tested at Tag v2.6.0 and on the develop branch (2.7.0-dev), same issues.

                  EDIT: Definitely an issue with electron: adding app.disableHardwareAcceleration(); in js/electron.js makes it open fine.

                  EDIT 2: Opened an issue for this #1500, looks like Electron v3.0.13 works.

                  D S 2 Replies Last reply Jan 6, 2019, 1:21 PM Reply Quote 1
                  • D Offline
                    devinhedge @shbatm
                    last edited by Jan 6, 2019, 1:21 PM

                    @shbatm @dazza120 @MichMich @bhepler @Mykle1

                    Okay… I think I’ve figured it out. It isn’t good news:

                    I’ve brought this up on another thread, but I’ll mention here so that it is captured in context: for the last couple months Node.js and npm are currently BROKEN on RaspberryPi.

                    I just tried a test this morning using the started Electron app at https://electronjs.org/docs/tutorial/first-app

                    Running the automated install is a Red Herring. It is inappropriate to suggest it.

                    We have to figure out how to fix the bugs in the Node.js installation for Raspberry Pi before anything else. I’m wondering if installing an older version of Node.js is the solution. If so, then what version would we start with?

                    S 1 Reply Last reply Jan 6, 2019, 3:40 PM Reply Quote 0
                    • S Offline
                      shbatm Module Developer @devinhedge
                      last edited by Jan 6, 2019, 3:40 PM

                      @devinhedge said in Clean installation... fails left and right:

                      for the last couple months Node.js and npm are currently BROKEN on RaspberryPi.

                      What version of node are you using and how are you trying to install it? Node.Js works fine with Raspberry Pi, just don’t install it from the default repos. Use these instructions:

                      https://github.com/nodesource/distributions/blob/master/README.md

                      I’ve installed both v8 and v10 successfully multiple times on new Pis in the last few months.

                      D 1 Reply Last reply Jan 6, 2019, 8:14 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        2/17
                        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