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.

    MagicMirror is Failing to start at all

    Scheduled Pinned Locked Moved Solved Troubleshooting
    22 Posts 4 Posters 4.5k 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.
    • S Offline
      Sampleswow @sdetweil
      last edited by

      @sdetweil
      pi@raspberrypi:~/MagicMirror $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)” apply
      update log will be in /home/pi/MagicMirror/installers/upgrade.log
      doing test run = false
      Node currently installed. Checking version number.
      Minimum Node version: v22.14.0
      Installed Node version: v24.4.1
      Check current Node installation …
      Node currently installed. Checking version number.
      Minimum Node version: v22.14.0
      Installed Node version: v24.4.1
      No Node.js upgrade necessary.
      Check current NPM installation …
      NPM currently installed. Checking version number.
      Minimum npm version: V10.9.2
      Installed npm version: V11.4.2
      No npm upgrade necessary.

      want /var/swap=200MByte, checking existing: keeping it
      saving custom.css
      local version 2.32.0 already same as master 2.32.0
      restoring custom.css
      pi@raspberrypi:~/MagicMirror $

      Still will not start

      S 2 Replies Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @Sampleswow
        last edited by

        @Sampleswow IMG_1964.png

        Because you did this manually the script will abort if the same version is already

        I provide another option, instead of apply use
        force
        At the end of the command

        I don’t document this because I dont want everyone using force and getting into more trouble.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil
          So i used the force protocol and it took some time and did some things. after it was done i attempted to start the MM using both the old way and they way the release notes said and i still get this,

          pi@raspberrypi:~ $ cd MagicMirror
          pi@raspberrypi:~/MagicMirror $ npm start

          magicmirror@2.32.0 start
          node --run start:x11

          node: bad option: --run
          pi@raspberrypi:~/MagicMirror $ node --run
          node: --run requires an argument
          pi@raspberrypi:~/MagicMirror $

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @Sampleswow
            last edited by

            @Sampleswow can you show the output of

            node -v

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil
              pi@raspberrypi:~ $ node -v
              v24.4.1
              pi@raspberrypi:~ $ cd MagicMirror
              pi@raspberrypi:~/MagicMirror $ node -v
              v24.4.1

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @Sampleswow
                last edited by

                @Sampleswow thanks

                Try this

                sudo n 22.14
                hash -r
                node -v
                

                You should get 22.14 or 22.15

                Then try npm start in the MagicMirror folder

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @sdetweil
                  pi@raspberrypi:~ $ sudo n 22.14
                  copying : node/22.14.0
                  installed : v22.14.0 (with npm 10.9.2)
                  pi@raspberrypi:~ $ hash -r
                  pi@raspberrypi:~ $ node -v
                  v22.14.0
                  pi@raspberrypi:~ $ cd MagicMirror
                  pi@raspberrypi:~/MagicMirror $ npm start

                  magicmirror@2.32.0 start
                  node --run start:x11

                  node: bad option: --run
                  pi@raspberrypi:~/MagicMirror $

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @Sampleswow
                    last edited by

                    @karsten13 have any debug advice here?

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    karsten13K 1 Reply Last reply Reply Quote 0
                    • karsten13K Offline
                      karsten13 @sdetweil
                      last edited by

                      @sdetweil

                      can you see what I’m doing right now ;)

                      I used my containers a few minutes ago to see if I can reproduce but I can’t. So no idea.

                      1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @Sampleswow
                        last edited by

                        @Sampleswow ok, it makes no sense

                        I would suggest starting over
                        Reflash the SD card
                        Use the script to Install

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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

                          @sdetweil
                          is that the only way? I have a lot of setup, I would hate to lose by starting over.

                          also again What script i have no idea what your referring to, or how to use it. I am a basic user of Magic Mirror

                          S 1 Reply Last reply Reply Quote 0
                          • S Do not disturb
                            sdetweil @Sampleswow
                            last edited by sdetweil

                            @Sampleswow

                            I have two sets of scripts, install/update are listed in the MagicMirror doc
                            IMG_1970.png

                            Install/upgrade
                            https://github.com/sdetweil/MagicMirror_scripts

                            Backup/restore, which can save your MagicMirror setup and place it in a GitHub repo, with versions (it does not backup folders, only info required to restore the config onto a new MagicMirror install.).

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

                            You can backup Your config now, copy off system, upload to GitHub as part of backup
                            config.js, custom.css, all the installed modules and where they came from. And any new files they created

                            I always recommend using a new SD card anyhow, just in case there is something (which I will fix)

                            Nodejs is just a tool we use to launch Our app, and run our code.
                            I don’t see any reports of problems like this so, I don’t know

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            KristjanESPERANTOK 1 Reply Last reply Reply Quote 0
                            • KristjanESPERANTOK Offline
                              KristjanESPERANTO Module Developer @sdetweil
                              last edited by KristjanESPERANTO

                              If --run is a bad option let’s try run the long command directly and see what happens.

                              So instead of npm run, try this:

                              On Wayland:

                              WAYLAND_DISPLAY="${WAYLAND_DISPLAY:=wayland-1}" ./node_modules/.bin/electron js/electron.js --enable-features=UseOzonePlatform --ozone-platform=wayland

                              On X11:
                              DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js

                              This may show us the real core of the problem, or it works and starts MM properly and we could make it a little more comfortable (even if it is a bit hacky).

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                Sampleswow @KristjanESPERANTO
                                last edited by

                                @KristjanESPERANTO said in MagicMirror is Failing to start at all:

                                DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

                                This Command STARTED my Mirror!!!

                                Im super excited everything is the way I left it even no loading google images lol (I know i have to find and alternative now )

                                S 1 Reply Last reply Reply Quote 1
                                • S Do not disturb
                                  sdetweil @Sampleswow
                                  last edited by

                                  @Sampleswow awesome

                                  edit the package.json
                                  and change the “start”
                                  to “startx”
                                  then add this line after

                                  "start":"DISPLAY=${DISPLAY:=:0} ./node_modules/.bin/electron js/electron.js",
                                  

                                  then

                                  npm start
                                  

                                  should start your MagicMirror

                                  this was the way it was before this release

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

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

                                    @sdetweil
                                    That worked i picked the right start because there is apparently 2 of them in the text code

                                    1 Reply Last reply Reply Quote 0
                                    • S sdetweil has marked this topic as solved on
                                    • S Offline
                                      Sampleswow @sdetweil
                                      last edited by

                                      @sdetweil
                                      Update for the Jan 1 2026,
                                      This no longer fixes the issue. I used your update script and now i get this error;
                                      sh: 1: ./node_modules/.bin.electron.js: not found

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Do not disturb
                                        sdetweil @Sampleswow
                                        last edited by

                                        @Sampleswow should not say electron.js

                                        Do

                                        cd ~/MagicMirror 
                                        ls node_modules/electron
                                        

                                        If not found do

                                        npm install electron@39.2.7
                                        

                                        If successful
                                        Do

                                        npm start
                                        

                                        Please advise

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

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

                                          @sdetweil
                                          That fixed it for now. I guess will talk again next update lol, Thank you for your dedication to resolving my issue!

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Do not disturb
                                            sdetweil @Sampleswow
                                            last edited by

                                            @Sampleswow can you send me the ~/MagicMirror/installers/upgrade.log
                                            Via email.

                                            The same userid as here at gmail

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            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
                                            • 1 / 2
                                            • 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