Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
80
rated 0 times [  82] [ 2]  / answers: 1 / hits: 56158  / 7 Years ago, tue, march 21, 2017, 12:00:00

When multiple Git branches modify the dependencies in a project that uses Yarn, it is likely to introduce a conflict in the yarn.lock file. It is not a good idea to delete and regenerate the yarn.lock file because this will probably cause several packages to be unintentionally upgraded. What is the best way to quickly resolve conflicts in this file?


More From » git

 Answers
3

Since Yarn 1.0 it's easy because it has built in support for this scenario.


First solve the conflict in package.json manually, then just run this:


$ yarn install

yarn install v1.0.1
info Merge conflict detected in yarn.lock and successfully merged.
[1/4] Resolving packages...

And then the conflict will be resolved and you can commit that or continue rebasing if that was what you were doing.


[#58449] Monday, March 20, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
emanir

Total Points: 151
Total Questions: 90
Total Answers: 105

Location: Suriname
Member since Sun, Jun 13, 2021
3 Years ago
;