-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to yarn v4 with yarnPath #8
Conversation
I'd like to get CI builds setup before merging this. Over the weekend, I noticed in a side project that the version of Yarn I expected to be used wasn't (JapanFinance/JapanFinance.github.io#47). We'll need to do something similar here I expect. |
Specifies the package manager (yarn) and version (4.0.2) in package.json. The package-lock.json file was removed. Yarn reported an error due to having both it and yarn.lock. There should only be one lock file. The yarn.lock file has been rewritten in the latest yarn lock format.
547f84a
to
7bb69a5
Compare
As suspected, this wasn't using yarn v4 but rather the globally installed yarn v1. From the build:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having both a package-lock.json and yarn.lock file results in a warning from yarn. This file won't be used so long as yarn is doing the building. But I notice that GitHub is opening pull requests to update dependencies that only update package-lock.json. That won't actually change anything for our build.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
The original intent was to use yarn v4 via corepack as is encouraged, but the setup-node action does not have an option to enable corepack. We can check in yarn to source control and use that copy until corepack is more easily usable with setup-node.
Specifies the package manager (yarn) and version (4.0.2) in package.json. The package-lock.json file was removed. Yarn reported an error due to having both it and yarn.lock. There should only be one lock file. The yarn.lock file has been rewritten in the latest yarn lock format.
https://yarnpkg.com/migration/guide