← Quiz: Resolving Merge Conflicts: all 15 questions
Quiz: Resolving Merge Conflicts · Question 10 of 15
package-lock.json has a conflict after a merge. What is the usual safe approach?
package-lock.json has a conflict after a merge. What is the usual safe approach?
- A.Edit the lock file by hand line by line
- B.Delete package.json
- C.Resolve package.json first, then regenerate the lock file with npm install
- D.Always accept "ours" without checking package.json
Answer & explanation
Correct answer: Resolve package.json first, then regenerate the lock file with npm install
Lock files are generated; regenerating them from the resolved package.json gives a consistent result.
Can you get the rest right without peeking?
Take the timed Quiz: Resolving Merge Conflicts quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →