MagicMirror Forum

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

    SOLVED MM Ver.2.21 Electron failed to install error

    Troubleshooting
    2
    6
    219
    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
      Rags last edited by

      I just updated to ver 2.21. MM crashed and no longer working. npm start shows error

      magicmirror@2.21.0 start
      DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

      /home/pi/MagicMirror/node_modules/electron/index.js:17
      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:17:11)
      at Object. (/home/pi/MagicMirror/node_modules/electron/index.js:21:18)
      at Module._compile (node:internal/modules/cjs/loader:1155:14)
      at Object.Module._extensions…js (node:internal/modules/cjs/loader:1209:10)
      at Module.load (node:internal/modules/cjs/loader:1033:32)
      at Function.Module._load (node:internal/modules/cjs/loader:868:12)
      at Module.require (node:internal/modules/cjs/loader:1057:19)
      at require (node:internal/modules/cjs/helpers:103:18)
      at Object. (/home/pi/MagicMirror/node_modules/electron/cli.js:3:18)
      at Module._compile (node:internal/modules/cjs/loader:1155:14)

      Please help in resolving issue. A step by step instructions would help. I dont want to reinstall MM all over again. Adding all modules and reconfiguring the config.js file is not an option.
      Thanks.

      S 2 Replies Last reply Reply Quote 0
      • S
        sdetweil @Rags last edited by

        @Rags how did u update? manual git pull/npm install or my upgrade script?

        can you show output of

        uname -a
        lsb_release -a
        node -v
        npm -v

        u ‘might’ have luck with

        cd ~/MagicMirror
        npm install electron@19.1.0
        

        report the results.

        Sam

        Create a working config
        How to add modules

        R 1 Reply Last reply Reply Quote 0
        • S
          sdetweil @Rags last edited by

          @Rags also if you use something like my backup/restore it could save you literally DAYS of work

          see
          https://github.com/sdetweil/MagicMirror-backup-restore

          and my script repo, install/upgrade

          https://github.com/sdetweil/MagicMirror_scripts

          Sam

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • R
            Rags @sdetweil last edited by

            @sdetweil
            I did a git pull in MM directory.
            However before that i had tried to install MMM-json-feed which failed during installation. I guess it must have messed up the electron somhow.
            uname -a
            Linux raspberrypi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
            npm -v 9.1.2
            node -v 16.8.1
            when i do a npm install electron@19.1.0 i get
            pi@raspberrypi:~/MagicMirror $ npm install electron@19.1.0
            npm ERR! code ENOTEMPTY
            npm ERR! syscall rename
            npm ERR! path /home/pi/MagicMirror/node_modules/ip6
            npm ERR! dest /home/pi/MagicMirror/node_modules/.ip6-Ll8TJZWc
            npm ERR! errno -39
            npm ERR! ENOTEMPTY: directory not empty, rename ‘/home/pi/MagicMirror/node_modules/ip6’ -> ‘/home/pi/MagicMirror/node_modules/.ip6-Ll8TJZWc’

            npm ERR! A complete log of this run can be found in:
            npm ERR! /home/pi/.npm/_logs/2022-11-24T16_02_00_445Z-debug-0.log

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

              @Rags ok best to clean

              do

              cd ~/MagicMirror
              rm -rf node_modules
              rm package-lock.json
              npm install --omit=dev  --no-audit --no-fund
              

              Sam

              Create a working config
              How to add modules

              R 1 Reply Last reply Reply Quote 0
              • R
                Rags @sdetweil last edited by

                @sdetweil
                Bingo. All systems go…
                Thanks once again.
                I am doing the backup restore thing now.

                1 Reply Last reply Reply Quote 1
                • 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