ci: work around yarn install failure on Node.js 18.x #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Situation
GitHub Actions CI workflow yarn.yaml runs against
node-version: 18.16
, where the commandyarn install
fails:Yarn should not be attempting to use
[email protected]
as [email protected] is defined as a dependency of [email protected] and this is the version to install.This is caused by a bug in Yarn Classic (v1), which is however unsupported since January 2020 (see Yarn 1 GitHub repo and Yarn Classic v1 documentation) and so there is no expectation that the bug will be fixed. The problem does not occur in Yarn Modern, or in npm.
Change
In yarn.yaml, change to use:
Note that this does not allow the workflow to succeed, because then
yarn test
fails, however it does provide more information about the status of the repository, if dependency installation is successful and tests can run.