should you push package-lock.json code example
Example 1: how to generate package-lock.json from package.json
Have you deleted package-lock.json file? don't worry
Run below command to generate package-lock.json file in your folder.
npm i --package-lock-only
Example 2: do i need to add package-lock.json to git
Yes.
Explanation: To run the application, the dependencies must have been installed
before. So when you run "npm install", you need to know the version of each
dependency, which is stored inside package-lock.json.