Node.js · Junior · Question 23 of 75
What is package-lock.json for?
- ✓Correct answer: It records the exact versions of every installed package, so installs are reproducible
- 2It lists packages that are blocked for security reasons
- 3It prevents other users from editing
package.json
Explanation
package.json usually has version ranges like ^4.2.0. The lock file pins the exact tree, including nested dependencies. It should be committed to git.