Is there a way to force npm to generate package-lock.json?

后端 未结 7 758
Happy的楠姐
Happy的楠姐 2021-01-30 05:59

I deleted it by accident and have made many changes to package.json since. An npm install or npm update do not generate package-lock

7条回答
  •  忘掉有多难
    2021-01-30 06:30

    If your npm version is lower than version 5 then install the higher version for getting the automatic generation of package-lock.json.

    Example: Upgrade your current npm to version 6.14.0

    npm i -g npm@6.14.0
    

    You could view the latest npm version list by

    npm view npm versions
    

提交回复
热议问题