While contributing to open-source, we often encounter an issue that leads to changes in the package-lock.json
file, and maintainer or the owners of the repository may ask you to Revert those changes in the package-lock.json
file while reviewing your PR.
Eventhough you've not committed anything in your package-lock.json
file, but since you run NPM
when you start, it automatically updates the package version to the latest. It then sometimes leads to conflicts with the main
branch, or distrubs the workflows in somecases!
Method - 1 (Click Here to view a video demo)
- Go to
Files changed
section in your PR - Check what changes are made in
package-lock.json
file. - Go to Editor, and revert the changes back to initials
- Good to go now! 🎉
Method - 2
- Copy whole content from the base branch.
- Paste it in your file.
- And, that's it! Good to goo now! 🎉
For any queries now, reply me below!
🤡