Closed chriszimmerman closed 2 years ago
Any chance we can add the yarn version to the package.json
file, as well? I think that will enforce the version we use.
Don't know if it's relevant, but a .node_version
file at the root can help with this, too.
https://medium.com/productboard-engineering/one-yarn-to-rule-them-all-2d950127ee6f
Any chance we can add the yarn version to the
package.json
file, as well? I think that will enforce the version we use.Don't know if it's relevant, but a
.node_version
file at the root can help with this, too.https://medium.com/productboard-engineering/one-yarn-to-rule-them-all-2d950127ee6f
It looks like it's in there under the engine
property (which should now show up in the diff) in the package.json
.
In the article you posted, there is the suggestion to run yarn policies set-version
to set the yarn version and enforce it, so I ran that. The CI check still looks good
When opening PRs or deploying to Heroku, I noticed a problem when the build tried to install yarn. Here is an example:
https://github.com/rubyforgood/shelter-assist/runs/6885776407?check_suite_focus=true
The output:
And there's similar log output related to this issue when deploying to Heroku:
There seems to be an issue with a yarn version mismatch. I believe yarn-actions is just getting the latest version of yarn that it can find, which may be different from the version of yarn specified in our package.json.
Running the
yarn set version
command sets yarn to a particular version and adds the files in this commit. I think as we upgrade yarn in the future, we can re-runyarn set version
to update the .yarnrc files.