sometimes you get inconsistent yarn.lock file, because your systems are different.
To avoid this, I have the same Node and Ruby version on the server and on the dev computers:
Node Version Manager (nvm), or N are great to have multiple node versions in userland (not system wide). With a .node-version file in the project and Automatic Version Switching (avn), the proper node version is used when you cd to your project.
RBEnv works the same for Ruby, with a .ruby-version file in the project.
It may be a burden to setup, but once it's done, it's done, and changing projects and required versions becomes a breeze.
Example of contents for the .xxx-version files
.ruby-version should be the exact version, as far as I remember:
2.5.1
2.6.6
.node-version has any level; avn will pick what matches:
To avoid this, I have the same Node and Ruby version on the server and on the dev computers:
.node-versionfile in the project and Automatic Version Switching (avn), the proper node version is used when youcdto your project..ruby-versionfile in the project.It may be a burden to setup, but once it's done, it's done, and changing projects and required versions becomes a breeze.
Example of contents for the
.xxx-versionfiles.ruby-versionshould be the exact version, as far as I remember:2.5.12.6.6.node-versionhas any level; avn will pick what matches:1210.210.6.5thank you for your comment. I will try that :)