2

I have some cases where in one project I have both package-lock.json and yarn.lock files (this is done unintentionally, but it's not relevant at the moment) - In order to remove one of them (personally I prefer leaving the yarn.lock file) - I first need to know what are the differences between them, for that I can see two different solution :

  1. Finding difference in version between the two files (packages that are listed in both in different version / packages that are listed in only one of lock files)
  2. Delete both lock files, and generate a new one from the packages that are actually installed in my node_modules folder

I found no command to do both (I'd expect yarn to provide that, since yarn is "npm compatible" and not the other way around)

I found yarn generate-lock-entry whose name suggest that it should be relevant for my 2nd option - but it has nothing to do with that

Any Idea? Thanks!

tk421
  • 5,775
  • 6
  • 23
  • 34
Yaron U.
  • 7,681
  • 3
  • 31
  • 45

0 Answers0