Search code examples
next.jsbitbucketyarnpkgpull-requestmerge-conflict-resolution

How can I resolve this yarn.lock conflict problem?


I've been developing next.js project using yarn and bitbucket. When I try to merge my branch to origin, but conflict problem is occurred. It is from yarn.lock file. There are many diffs between origin's and my branch's. How could I resolve this conflict problem?


Solution

  • Did you install any new packages? Or update the ones that were being used? If so, you should merge and keep your changes.

    But if that's not the case, just discard your changes and keep the file as it was on the origin. Because if there was something wrong on the origin that you didn't cause, it's not your job to fix it. If it is your job to fix it, I'd say you delete your yarn.lock file, run yarn install and push the new yarn.lock file.