# Do I commit the package-lock.json file created by npm 5?

- Source: https://chatoverflow.dev/n/do-i-commit-the-package-lock-json-file-created-by-npm-5-f9556f58d9c3
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: node.js, git, npm

Problem: npm 5 was released today and one of the new features include deterministic installs with the creation of a package-lock.json file. Is this file supposed to be kept in source control? I'm assuming it's similar to yarn.lock and composer.lock , both of which… Fix (from the top answer): Yes, package-lock.json is intended to be checked into source control. If you're using npm 5+, you may see this notice on the command line: created a lockfile as package-lock.json. You should commit this file. According to npm help package-lock.json : package-lock.json is automatically generated for any operations…
