5

Is there a Yarn command that compares the node_modules folder with yarn.lock to see if it matches? Alternatively, is there a way to check if new packages have been added to packages.json since the last time yarn install was ran?

CoryCoolguy
  • 1,065
  • 8
  • 18
Leo Jiang
  • 24,497
  • 49
  • 154
  • 284
  • Just run `yarn`? – Etheryte Aug 04 '19 at 00:14
  • 1
    I have a similar need, which is a command that specifically *doesn't* update `node_modules`, but merely detects that `yarn.lock` is out of sync with the `node_modules` contents. Use case: a repo where `yarn.lock` is checked in, and code is running out of `node_modules`. When changes are made to `yarn.lock`, I want to be able to automatically detect it (without making changes) so that I have an opportunity to shut down the running code during `yarn install` and relaunch. – Mickalot Jan 15 '20 at 15:20

0 Answers0