npm notice created a lockfile as package-lock.json. You should commit this file

后端 未结 8 2049
栀梦
栀梦 2020-12-09 01:06

I have been trying to load the skeleton of express with npm install express. It outputs the following line:

npm notice created a lockfil

8条回答
  •  借酒劲吻你
    2020-12-09 01:58

    It should also be noted that one key detail about package-lock.json is that it cannot be published, and it will be ignored if found in any place other than the top level package. It shares a format with npm-shrinkwrap.json(5), which is essentially the same file, but allows publication. This is not recommended unless deploying a CLI tool or otherwise using the publication process for producing production packages.

    If both package-lock.json and npm-shrinkwrap.json are present in the root of a package, package-lock.json will be completely ignored.

提交回复
热议问题