Auto-merging package-lock.json
Answer a question
git merge --no-ff account-creation
Auto-merging package-lock.json CONFLICT (content): Merge conflict in package-lock.json Automatic merge failed; fix conflicts and then commit the result.
Any idea regarding this issue ?
Answers
As per the docs:
Resolving lockfile conflicts
Occasionally, two separate npm install will create package locks that cause merge conflicts in source control systems. As of
npm@5.7.0, these conflicts can be resolved by manually fixing anypackage.jsonconflicts, and then runningnpm install [--package-lock-only]again. npm will automatically resolve any conflicts for you and write a merged package lock that includes all the dependencies from both branches in a reasonable tree. If--package-lock-onlyis provided, it will do this without also modifying your localnode_modules/.To make this process seamless on git, consider installing
npm-merge-driver, which will teach git how to do this itself without any user interaction. In short:$ npx npm-merge-driver install -gwill let you do this, and even works with pre-npm@5.7.0versions of npm 5, albeit a bit more noisily. Note that ifpackage.jsonitself conflicts, you will have to resolve that by hand and runnpm installmanually, even with the merge driver.
更多推荐


所有评论(0)