Woah, I just found an elegant way to resolve package-lock.json conflicts:...
Woah, I just found an elegant way to resolve package-lock.json conflicts:
npm install --package-lock-only
"npm will automatically resolve any conflicts for you and write a merged package lock that includes all the dependencies from both branches." 😍
https://docs.npmjs.com/cli/v6/configuring-npm/package-locks#resolving-lockfile-conflicts
Admission: When lock file conflicts occur, I typically just:
1. Delete the lock file
2. Run npm install to regenerate it
But "npm install --package-lock-only" is safer and cleaner because it avoids completely wiping and regenerating the lock. 👍