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.

    Unable to update

    Scheduled Pinned Locked Moved Troubleshooting
    15 Posts 6 Posters 9.6k 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.
    • E Offline
      eugenelai
      last edited by

      Hi all,

      I’m trying to update my MagicMirror but have two issues:

      1. When I type in sudo git pull && npm install to try update I get fatal: Not a git repository (or any of the parent directories): .git. The current directory I am in is /home/Pi/MagicMirror. So not sure if I have to do a init git command?

      2. If and when I do update I’ve made some changes to the modules I’ve installed. Is the best way, to temporarily copy them some where else then copy them back after the update?

      Thanks in advance

      Mykle1M strawberry 3.141S 2 Replies Last reply Reply Quote 0
      • Mykle1M Offline
        Mykle1 Project Sponsor Module Developer @eugenelai
        last edited by Mykle1

        @eugenelai

        You should not have to use sudo when updating. You’re in the right directory, so, just git pull && npm install

        Any changes you’ve made to the module files will be overwritten. So, yes, copy/move them to another location outside of the MagicMirror directory before updating

        Create a working config
        How to add modules

        E 1 Reply Last reply Reply Quote 0
        • foxF Offline
          fox
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • strawberry 3.141S Offline
            strawberry 3.141 Project Sponsor Module Developer @eugenelai
            last edited by

            @eugenelai sounds like you downloaded the mirror manually and didn’t use git clone.

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

            1 Reply Last reply Reply Quote 0
            • E Offline
              eugenelai @Mykle1
              last edited by eugenelai

              @Mykle1

              Sorry I get the same error message if I use sudo as well. I guess i’ll backup all the files I’ve changed do a git init then see what happens.

              @strawberry-3.141
              Nope did the automatic install.

              Mykle1M 1 Reply Last reply Reply Quote 0
              • Mykle1M Offline
                Mykle1 Project Sponsor Module Developer @eugenelai
                last edited by

                @eugenelai said in Unable to update:

                Sorry I get the same error message if I use sudo as well.

                Ok, but I said you should NOT have to use sudo to run those commands

                Create a working config
                How to add modules

                E 1 Reply Last reply Reply Quote 0
                • E Offline
                  eugenelai @Mykle1
                  last edited by

                  @Mykle1

                  Yeah still doesn’t work. I’ve done git init then tried both git pull && npm install with and without sudo and I get the following:

                  pi@MagicMirrorPi:~ $ cd MagicMirror
                  pi@MagicMirrorPi:~/MagicMirror $ sudo git pull && npm install
                  fatal: No remote repository specified.  Please, specify either a URL or a
                  remote name from which new revisions should be fetched.
                  pi@MagicMirrorPi:~/MagicMirror $ 
                  
                  Mykle1M 1 Reply Last reply Reply Quote 0
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @eugenelai
                    last edited by Mykle1

                    @eugenelai

                    Personally, if this was me, I would rename my existing MagicMirror folder, install the new MagicMirror via git clone, run npm install in the new MagicMirror folder, then move what I want from the old MagicMirror installation into the new installation.

                    NO SUDO necessary

                    Create a working config
                    How to add modules

                    cowboysdudeC E 2 Replies Last reply Reply Quote 1
                    • cowboysdudeC Offline
                      cowboysdude Module Developer @Mykle1
                      last edited by

                      @Mykle1 Yes that would be the easiest way to do it!

                      1 Reply Last reply Reply Quote 0
                      • E Offline
                        eugenelai @Mykle1
                        last edited by

                        @Mykle1

                        that’s a good idea… Let me try that.

                        Cheers for the help

                        cowboysdudeC 1 Reply Last reply Reply Quote 1
                        • cowboysdudeC Offline
                          cowboysdude Module Developer @eugenelai
                          last edited by

                          @eugenelai It will save you endless headaches…

                          E 1 Reply Last reply Reply Quote 0
                          • E Offline
                            eugenelai @cowboysdude
                            last edited by

                            @cowboysdude @Mykle1

                            Well, tried renaming, then installing a new MagicMirro via git clone and then run npm install and its totally gone tits up.

                            Ah well just going to wipe the SD card and start again. Thankfully have all my stuff backed up.

                            1 Reply Last reply Reply Quote 0
                            • K Offline
                              kidddrock
                              last edited by kidddrock

                              Hopefully it’s not too late to help save you (and others) some time and worry.

                              I just updated my install using ‘git pull && npm install’ and it actually aborts if it detects the update will overwrite files you’ve changed (pretty awesome feature imo).

                              Also, you don’t need to copy your main folder or even move any files elsewhere - all you need to do is rename the files it says would be overwritten with the update, and you can leave them in the same folder.
                              For instance, it said my main.css had changes and would be overwritten. I just renamed it to main2.css and left it where it was (and did similarly to a few other files).

                              After updating to the latest MM, I just went to the css folder, opened up that file (sudo nano main2.css), then saved it overwriting the newly updated version (saved to main.css).
                              That’s all I did for the few files I had customized and upon restart, all of my changes were present. Good luck!

                              E 1 Reply Last reply Reply Quote 0
                              • foxF Offline
                                fox
                                last edited by

                                After every MagicMirror update i have to set up the MagicMirror from scratch.
                                It crashed my system completely.
                                So if you dont want to have hours of time and headache, simply do not update your system.
                                I had the same problem when i did the last update.
                                My journey yesterday

                                1 Reply Last reply Reply Quote 0
                                • E Offline
                                  eugenelai @kidddrock
                                  last edited by

                                  @kidddrock said in Unable to update:

                                  Hopefully it’s not too late to help save you (and others) some time and worry.

                                  I just updated my install using ‘git pull && npm install’ and it actually aborts if it detects the update will overwrite files you’ve changed (pretty awesome feature imo).

                                  Also, you don’t need to copy your main folder or even move any files elsewhere - all you need to do is rename the files it says would be overwritten with the update, and you can leave them in the same folder.
                                  For instance, it said my main.css had changes and would be overwritten. I just renamed it to main2.css and left it where it was (and did similarly to a few other files).

                                  After updating to the latest MM, I just went to the css folder, opened up that file (sudo nano main2.css), then saved it overwriting the newly updated version (saved to main.css).
                                  That’s all I did for the few files I had customized and upon restart, all of my changes were present. Good luck!

                                  Actually it wasn’t a matter of overwriting files. That I could figure out. I couldn’t even do a git pull During the automatic installation a .git file wasn’t created or initialised. Worked out in the end thought… Just a massive ball ache.

                                  1 Reply Last reply Reply Quote 1

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