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

Merge conflict after update to 2.19

Scheduled Pinned Locked Moved Solved Troubleshooting
8 Posts 2 Posters 1.8k 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.
  • D Offline
    DarrenHill
    last edited by DarrenHill Apr 2, 2022, 9:41 AM Apr 2, 2022, 9:32 AM

    I think I need a little GitHub help.

    Just updated from 2.18 to 2.19 using the updater script, and accepted the stashing of a couple of files (including package.json iirc) and then selected unstashing at the end.

    But after reboot I just go to the Pi desktop rather than the mirror, and the logs have this in them:

    npm ERR! code EJSONPARSE
    npm ERR! path /home/pi/MagicMirror/package.json
    npm ERR! Merge conflict detected in your package.json.
    npm ERR!
    npm ERR! Please resolve the package.json conflict and retry.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/pi/.npm/_logs/2022-04-02T09_27_46_355Z-debug-0.log
    npm ERR! code EJSONPARSE
    npm ERR! path /home/pi/MagicMirror/package.json
    npm ERR! Merge conflict detected in your package.json.
    npm ERR!
    npm ERR! Please resolve the package.json conflict and retry.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/pi/.npm/_logs/2022-04-02T09_27_48_900Z-debug-0.log
    npm ERR! code EJSONPARSE
    npm ERR! path /home/pi/MagicMirror/package.json
    npm ERR! Merge conflict detected in your package.json.
    npm ERR!
    npm ERR! Please resolve the package.json conflict and retry.
    
    

    How do I resolve that conflict? If I try to move package.json away and git pull I get

    error: Pulling is not possible because you have unmerged files.
    hint: Fix them up in the work tree, and then use 'git add/rm <file>'
    hint: as appropriate to mark resolution and make a commit.
    fatal: Exiting because of an unresolved conflict.
    

    My GitHub-fu is not strong enough to know how to resolve this one. Can someone assist in what commands I need?

    The git stash is

     fonts/package-lock.json                            |    26 -
     modules/default/weatherforecast/weatherforecast.js |     2 +-
     package-lock.json                                  | 15293 ------------------------------------------------------------------------------------------------
     package.json                                       |     1 +
     vendor/package-lock.json                           |   154 -
     5 files changed, 2 insertions(+), 15474 deletions(-)
    
    
    D 1 Reply Last reply Apr 2, 2022, 10:12 AM Reply Quote 0
    • D Offline
      DarrenHill @DarrenHill
      last edited by DarrenHill Apr 2, 2022, 10:13 AM Apr 2, 2022, 10:12 AM

      OK did some searching and some reading of GitHub documentation and have resolved it. Used “Git Status” and the command options given therein.

      Now just have to up the update for the default modules due to the depreciations

      S 1 Reply Last reply Apr 2, 2022, 11:45 AM Reply Quote 0
      • S Offline
        sdetweil @DarrenHill
        last edited by Apr 2, 2022, 11:45 AM

        @DarrenHill rule 1. NEVER change the mm supplied source.

        you can do all the config thru the config.js.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        D 1 Reply Last reply Apr 2, 2022, 11:59 AM Reply Quote 0
        • D Offline
          DarrenHill @sdetweil
          last edited by Apr 2, 2022, 11:59 AM

          @sdetweil Yes, I’m not quite sure what the weatherforecast.js change was, but that’s blown away now. As you say, the new module is fine with a little tweaking via custom.css.

          It was the package.json file that screwed things up, and that I know I have never touched and have no idea what it was and why it got out of sync.

          Anyway I learned a bit of stuff about GitHub and stashing, so that’s a bonus and we’re up and running again fine (after swapping out the depreciated weather modules too).

          S 1 Reply Last reply Apr 2, 2022, 12:03 PM Reply Quote 1
          • S Offline
            sdetweil @DarrenHill
            last edited by Apr 2, 2022, 12:03 PM

            @DarrenHill
            the

            git diff  x
            

            command
            will show you the changes

            x is an optional file name.
            if not supplied, it will show all changes to all changes files

            git status will show you if any files are changed

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            D S 2 Replies Last reply Apr 2, 2022, 12:08 PM Reply Quote 1
            • D Offline
              DarrenHill @sdetweil
              last edited by Apr 2, 2022, 12:08 PM

              @sdetweil Good to know.

              git status got me out of it, as I think things got out of sync rather than really needing merging or proper tracking (if subsequent research on what package.json actually means and does).

              But useful to know how to actually see the differences for future reference. I really need to get more skilled-up on GitHub, but it always defeats me as I’m only an occasional hobby programmer for personal usage rather than for sharing/collaboration.

              S 1 Reply Last reply Apr 8, 2022, 1:53 PM Reply Quote 0
              • S Offline
                sdetweil @sdetweil
                last edited by Apr 2, 2022, 12:09 PM

                also

                git checkout filename
                

                will restore a file to it’s repo contents.

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 2
                • S Offline
                  sdetweil @DarrenHill
                  last edited by Apr 8, 2022, 1:53 PM

                  @DarrenHill git is the thing

                  gitHUB is just server for holding code, and accepting changes (pull requests) from others

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    4/8
                    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