The following error may appear in the Rails development environment when executing commands, despite recently updating Yarn packages:

"warning Integrity check: Flags don't match
error Integrity check failed
error Found 1 errors.
========================================
  Your Yarn packages are out of date!
  Please run `yarn install --check-files` to update.
========================================
To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml)."

This can be triggered by running rails assets:precompile during local development.

There are two options for correcting the error, both explained in the message output:

  1. Always run yarn install after rails assets:precompile in the dev environment
  2. Update /config/webpacker.yml with the suggested change, setting check_yarn_integrity to ‘false’

The issue is discussed in greater detail in this Webpacker repo thread.