简体   繁体   English

Whats difference between package-lock.json and package.json, when is package.json generated?

[英]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.

相关问题 从 package-lock.json 创建 package.json - Create package.json from package-lock.json 有没有办法从 package-lock.json 中提取 package.json? - Is there a way to extract package.json from package-lock.json? npm-force-resolutions 是否会破坏 package.json 和 package-lock.json 之间的同步? - Does npm-force-resolutions break the sync between package.json and package-lock.json? 当依赖版本不同步时,如何对齐 package.json 和 package-lock.json? - How To Align package.json and package-lock.json When Dependency Versions Are Out of Sync? 推送到 Heroku 时出现 package.json/package-lock.json 同步错误 - Getting package.json/package-lock.json sync error when pushing to Heroku 如何使用 npm 将 package-lock.json 和/或 package.json 中的包版本更新到最新版本? - How to update version of a package in package-lock.json and/or package.json using npm to latest version? 升级React库版本:建议只推送package.json还是同时推送package.json和package-lock.json? - Upgrading React library version: is it advisable to push only package.json or to push package.json and package-lock.json both? package.json:&和&&有什么区别? - package.json: what is the difference between & and &&? 有没有办法确认package-lock.json实际上解析了package.json中的所有依赖项? - Is there a way to confirm a package-lock.json actually resolves all dependencies in a package.json? 为什么`npm install`为同一个`package.json`文件生成不同的`package-lock.json`文件? - Why does `npm install` generate different `package-lock.json` files for the same `package.json` file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM