Is there any kind-teacher can answer my question above?
FYI I'm using WebStorm and making with node.js
I installed npm module like nconf
and package-lock.json has made.
I expected package.json would've been made.
Thank you.
lock. json is created for locking the dependency with the installed version. It will install the exact latest version of that package in your application and save it in package.
package-lock. json defines versions used in my project. There should be no need to remove it completely and thus upgrade all dependencies to the latest version just because I upgrade Vaadin.
json that result in two different installs. You may have noticed it before; you install a package using npm and suddenly a new file called package-lock. json appears in your project directory. Don't delete that package-lock file, run npm install and regenerate it!
Describe the dependency tree in a given moment, so with this description all the dependencies can be created again exactly the same way it was, this ensures the expected behavior from the dependencies.
In the npm documentation you can read:
package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or 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.
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.
To facilitate greater visibility of tree changes through readable source control diffs.
And optimize the installation process by allowing npm to skip repeated metadata resolutions for previously-installed packages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With