package-lock.json

Damaris Göbel
Feb 19, 2023

--

package-lock.json is automatically generated where npm modifies either the node_modules tree, or the package.json.

It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.

The package-lock.json stores an exact, versioned dependency tree rather than using starred versioning like package.json itself

The package.json contains only your direct dependencies, not the dependencies of your dependencies (nested dependencies).

The package-lock.json locks in the versions of the full dependency tree. This guarantees the dependency tree for other other developers or releases.

You should not alter the contents of this file.

--

--

Damaris Göbel

I like to do crazy things with CSS & JavaScript. My brain occasionally runs out of memory so I need to write down my thoughts.