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

MM Ver.2.21 Electron failed to install error

Scheduled Pinned Locked Moved Solved Troubleshooting
6 Posts 2 Posters 1.7k Views 2 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.
  • R Offline
    Rags
    last edited by Nov 24, 2022, 2:56 PM

    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 Nov 24, 2022, 3:31 PM Reply Quote 0
    • S Offline
      sdetweil @Rags
      last edited by Nov 24, 2022, 3:31 PM

      @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

      How to add modules

      learning how to use browser developers window for css changes

      R 1 Reply Last reply Nov 24, 2022, 4:11 PM Reply Quote 0
      • S Offline
        sdetweil @Rags
        last edited by Nov 24, 2022, 3:33 PM

        @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

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • R Offline
          Rags @sdetweil
          last edited by Nov 24, 2022, 4:11 PM

          @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 Nov 24, 2022, 4:45 PM Reply Quote 0
          • S Offline
            sdetweil @Rags
            last edited by Nov 24, 2022, 4:45 PM

            @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

            How to add modules

            learning how to use browser developers window for css changes

            R 1 Reply Last reply Nov 24, 2022, 4:53 PM Reply Quote 0
            • R Offline
              Rags @sdetweil
              last edited by Nov 24, 2022, 4:53 PM

              @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
              1 / 1
              • First post
                1/6
                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