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.

    Attempting To Update

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    11 Posts 6 Posters 4.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.
    • K Offline
      KumarTRD
      last edited by yawns

      Attempting to update y MagicMirror and getting the following…0_1548302466116_3c1adce9-d2de-4ef9-963f-f6fa6ea1cea1-image.png

      Bild Text

      Can anyone help out here… this is my first time updating since I started playing with my pi last year.

      1 Reply Last reply Reply Quote 0
      • U Offline
        Ultimatum22 Module Developer
        last edited by

        Those files are auto created by the system, you can safely remove them.

        rm package-lock.json
        
        rm vendor/package-lock.json
        

        In order to update git requires that no local files have changes, that is what the error message means.
        Those files should really be in a .gitignore file but that is another issues. Removing the files should solve your issue.

        lavolp3L K 3 Replies Last reply Reply Quote 1
        • lavolp3L Offline
          lavolp3 Module Developer @Ultimatum22
          last edited by

          @ultimatum22 said in Attempting To Update:

          Those files should really be in a .gitignore file but that is another issues.

          So why aren’t we putting them in? I still don’t really know what their purpose is.

          U 1 Reply Last reply Reply Quote 0
          • U Offline
            Ultimatum22 Module Developer @lavolp3
            last edited by

            @lavolp3 Because they are automatically generated files, you don’t include them in a repository.

            package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json. It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.
            

            https://docs.npmjs.com/files/package-lock.json

            lavolp3L 1 Reply Last reply Reply Quote 0
            • lavolp3L Offline
              lavolp3 Module Developer @Ultimatum22
              last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • K Offline
                KumarTRD @Ultimatum22
                last edited by

                @ultimatum22 tried what you said but got the following…
                0_1548384651039_E674B1BE-FBC8-44F8-A635-5FAB15E9E3BD.png

                Your help is appreciated; am I using the correct command to update my MagicMirror

                bheplerB justjim1220J 2 Replies Last reply Reply Quote 0
                • bheplerB Offline
                  bhepler Module Developer @KumarTRD
                  last edited by bhepler

                  @kumartrd You just tried to remove the same file twice, that’s all. You’re almost there. Try:

                  cd ~/MagicMirror
                  rm package-lock.json
                  

                  And while I have you here… please use the Markdown features of the board in the future when posting code and error messages. Thanks.

                  1 Reply Last reply Reply Quote 0
                  • justjim1220J Offline
                    justjim1220 Module Developer @KumarTRD
                    last edited by justjim1220

                    @kumartrd

                    you will also need to do this:

                    cd ~/MagicMirror/vendor
                    rm package-lock.json
                    

                    "Life's Too Short To Dance With Ugly People"
                    Jim Hallock - 1995

                    bheplerB 1 Reply Last reply Reply Quote 0
                    • bheplerB Offline
                      bhepler Module Developer @justjim1220
                      last edited by

                      @justjim1220 He already got that one.

                      1 Reply Last reply Reply Quote 1
                      • karsten13K Online
                        karsten13
                        last edited by

                        The git pull command fails if files are locally changed, because the pull would override them.
                        With git diff you can see what has changed.

                        If you are not interested to save these local changes you can run git reset --hard. This will revert all changes and after this the git pull should work.

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