Should I commit yarn.lock and package-lock.json files?

后端 未结 7 946
野趣味
野趣味 2020-12-12 12:15

We\'re using yarn for all our deterministic pkg installations but don\'t prevent the user from using npm - I\'m guessing having both these files will cause issues however. S

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-12 13:05

    You're correct! Allowing both npm and yarn to be used is going to cause issues. Take a look at this article.

    Currently, we’re planning to add some warnings to users who use both yarn and npm in the same repository to install packages.

    We highly recommend you to delete the package-lock.json file if you decide to use yarn in order to avoid future confusion and possible consistency issues.

    You may not want both npm and yarn as your package manager.

提交回复
热议问题