1

I see a common message when trying to start the rails server:

rails s                              
=> Booting Puma
=> Rails 6.0.3.2 application starting in development 
=> Run `rails server --help` for more startup options
error Couldn't find an integrity file                                                                                                              
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).


yarn check v1.22.10
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.

I have tried for 2 days to fix this. Deleting node_modules and reinstalling, etc, but nothing I do has worked. So I am considering doing as the message suggests and disabling the yarn integrity check.

Question

What does this integrity check do, and should I be worried about disabling it?

Notes

Disabling this integrity check is suggested/recommended in a few places, including

Info

I reinstalled nvm, node and yarn just to eliminate possible causes of problems:

nvm -v 
0.38.0

node -v
v16.0.0

npm -v
7.10.0

yarn -v
1.22.10
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
stevec
  • 41,291
  • 27
  • 223
  • 311

2 Answers2

2

have you tried running the suggested command?

yarn install --check-files

you could also try reinstalling webpacker, which will create a new manifest file which will pass integrity checks:

rails webpacker:install
  • 1
    Thanks, I tried `yarn install --check-files` many times, with many painful errors (related to the c++ compiler, I think). I will try your webpacker suggestion – stevec Apr 25 '21 at 16:09
  • 1
    Unfortunately `rails webpacker:install` gives exactly the same error message. – stevec Apr 25 '21 at 16:10
0

An update, the errors I was getting were very widespread, caused by a incompatibility with node 16 and a dependency (node-sass).

So rather than turn off the integrity check, I simply used nvm to downgrade to node 14

stevec
  • 41,291
  • 27
  • 223
  • 311