yarn check used here https://github.com/rails/webpacker/blob/master/lib/webpacker/railtie.rb#L33 is deprecated https://github.com/yarnpkg/rfcs/pull/106
We ran into an issue in our project where yarn install worked fine but yarn check was reporting multiple errors. Searching for a solution lead here https://github.com/yarnpkg/yarn/issues/6427#issuecomment-434499073 which lead to the merged deprecation.
I'd like to add that this has led to several wasted hours figuring this out - its especially problematic as that check command gets run on every rails command - it has even broken deploys for us
I suggest turning it off in your config/webpacker.yml if it's causing pain:
check_yarn_integrity: false
yarn check is also called out as buggy(https://classic.yarnpkg.com/en/docs/cli/check/) in addition to being deprecated and removed in Yarn 2.0 which has had its first stable release. I found another issue in the repo too which calls out that this will need to change soon https://github.com/rails/webpacker/issues/2007.
Is there an alternative for verifying integrity? The best alternative I know about is yarn install --check-files, but adding that would add the install to this step. I thought about opening a PR to do that, but I wasn't sure if that particular change would go over well
It's constantly causing issues for us now so I tried check_yarn_integrity: false in webpacker.yml (and restarted Spring) but it had no effect. Really slowing down development.
Most helpful comment
yarn checkis also called out as buggy(https://classic.yarnpkg.com/en/docs/cli/check/) in addition to being deprecated and removed in Yarn 2.0 which has had its first stable release. I found another issue in the repo too which calls out that this will need to change soon https://github.com/rails/webpacker/issues/2007.Is there an alternative for verifying integrity? The best alternative I know about is
yarn install --check-files, but adding that would add the install to this step. I thought about opening a PR to do that, but I wasn't sure if that particular change would go over well