When rebasing a branch with package.json conflicts, accepting one side's package-lock.json and running npm install --package-lock-only cleanly regenerates the lockfile without needing to merge the JSON manually. For engine mismatch errors (e.g. node version constraint), pass --engine-strict=false.
git checkout --ours fruit/package-lock.json (or --theirs)git add package-lock.json package.jsonnpm install --package-lock-only (add --engine-strict=false if node version doesn't match engines field)git add package-lock.json && git rebase --continue