Posted about 1 year ago. Visible to the public.

Yarn: How to recognize that you are using a different node version than your colleagues

The issue in this card can occur if the node_modules directory is checked into your Git repository. We usually recommend to exclude node_modules from version control.

In any case you should document which version of node to use in your project in a .nvmrc file.

I saw a strange behaviour after we introduced webpack in one of our projects and finally found out the reason: The person who committed the files used a node version that is older than mine.

Every time I wanted to run my rails dev server I was asked to check my yarn integrity:

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). yarn check v1.16.0 info Visit for documentation about this command. Exiting

After doing exactly that with yarn install --check-files I had file changes in node_modules/.yarn-integrity:

{ - "systemParams": "linux-x64-57", + "systemParams": "linux-x64-64", "modulesFolders": [ "node_modules" ], - "flags": [], + "flags": [ + "checkFiles" + ], "linkedModules": [], "topLevelPatterns": [ "@rails/webpacker@4.x",

There were also changes in node_modules/node-sass/vendor/linux-x64-64/binding.node.

After I switched to the "correct" version of node the problems were gone.

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Judith Roth
Last edit:
about 1 year ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Judith Roth to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more