Git · Junior · Question 67 of 75
What is a lockfile conflict in package-lock.json usually best resolved with?
- ✓Correct answer: Take one side, then run
npm installto regenerate it - 2Merge the two JSON halves by hand line by line
- 3Delete the lockfile and stop committing it
Explanation
Lockfiles are generated, so hand-merging is error-prone. Keep package.json correct and let npm rebuild a consistent lockfile, then review the result.