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

后端 未结 8 2051
栀梦
栀梦 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 02:01

    Yes. You should add this file to your version control system, i.e. You should commit it.

    This file is intended to be committed into source repositories

    You can read more about what it is/what it does here:

    package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json. It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.

提交回复
热议问题