该文件指定发布时的依赖版本,如果提交代码时若没有提交该文件,发布时会默认安装最新版本的依赖,如果使用了私有库,没有及时拉取新版本的依赖包,可能会导致发布报错。所以一般都会提交该文件,该文件会在执行npm install时自动生成 可在.gitignore文件中配置提交该文件
In version 5, npm introduced the package-lock . json file. 在版本5中, npm引入了 package-lock . json 文件 。 What’s that? You probably know about the package. json file, which is much more common and has been around ...