[英]package-lock.json not created with npm install
Am starting a new project with npm init
but the package-lock.json was not created. 我正在使用
npm init
启动一个新项目,但是没有创建package-lock.json。 I'm also not quite sure what the importance of this file is, cos everything seems to run like normal. 我也不太确定这个文件的重要性是什么,因为一切看起来都像正常一样。
package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json.
对于npm修改node_modules树或package.json的任何操作,都会自动生成package-lock.json。 It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.
它描述了生成的确切树,以便后续安装能够生成相同的树,而不管中间依赖性更新。
Basically you won't see it unless you do a npm install [module-name]
. 除非你做一个
npm install [module-name]
,否则基本上你不会看到它。 Since npm init
just initializes the project. 因为
npm init
只是初始化项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.