Why does “npm install git repo url” rewrite package-lock.json?

前端 未结 2 1067
傲寒
傲寒 2021-01-23 05:22

I am running the npm install in a public GitHub repo and it has locked the express at 4.17.0 in package-lock.json file which is the correc

2条回答
  •  爱一瞬间的悲伤
    2021-01-23 05:42

    npm install xxx will every time generate a new lock file. (Actually it just ignores lock file and generate each time it execute)

    npm ci on the other hand, is the command to install packages based on lock file instead of package.json

提交回复
热议问题