should we ignore 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: untrack package-lock.json
git rm package-lock.json