且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

npm install 不创建新的 package-lock.json

更新时间:2022-05-10 22:54:20

可能有一个名为 .npmrc 的文件可以包含

There might be a file called .npmrc which can contain

package-lock=false

这将导致不生成包锁定文件.

which will cause the package lock file to not be generated.

理论上你也可以全局打开 npm config set package-lock false(更改为 true 以再次打开),但这不太可能无意中发生.

In theory you could also have turned on npm config set package-lock false globally (change to true to turn on again), but that's less likely to happen unintentionally.