[英]Whats difference between package-lock.json and package.json, when is package.json generated?
When is package.json generated? package.json 何时生成? How it maintain consistency in various environments?
它如何在各种环境中保持一致性?
package-lock.json: records the exact version of each installed package which allows you to re-install them. package-lock.json:记录每个安装的 package 的确切版本,允许您重新安装它们。 Future installs will be able to build an identical dependency tree.
未来的安装将能够构建一个相同的依赖树。
package.json: records the minimum version you app needs. package.json:记录您的应用程序需要的最低版本。 If you update the versions of a particular package, the change is not going to be reflected here.
如果您更新特定 package 的版本,则此处不会反映更改。
Checkout this thread: Do I need both package-lock.json and package.json?结帐此线程: 我是否需要 package-lock.json 和 package.json?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.