You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should be committing the package-lock.json and removing package-lock.json from .gitignore.
NPM docs:
This file is intended to be committed into source repositories, and serves various purposes:
Describe a single representation of a dependency tree such that teammates, deployments, and continuous integration are guaranteed to install exactly the same dependencies.
Provide a facility for users to "time-travel" to previous states of node_modules without having to commit the directory itself.
Facilitate greater visibility of tree changes through readable source control diffs.
Optimize the installation process by allowing npm to skip repeated metadata resolutions for previously-installed packages.
As of npm v7, lockfiles include enough information to gain a complete picture of the package tree, reducing the need to read package.json files, and allowing for significant performance improvements.
Commit the package-lock.json
You should be committing the
package-lock.json
and removing package-lock.json from .gitignore.NPM docs:
Source: https://docs.npmjs.com/cli/v10/configuring-npm/package-lock-json
How
npm install
.The text was updated successfully, but these errors were encountered: