-
Notifications
You must be signed in to change notification settings - Fork 982
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
Github action fails with yarn 3 since bumping to v0.49.1 #4822
Comments
@noire-munich Yarn 3 includes greatly improved resolution than Yarn 1, including more tools to verify and keep yarn.lock robust. Do take a look at the new (and removed) options for You should also get in the habit of running To me, this reads like you have a busted yarn.lock. I'd try deleting and rebuilding. And/or start with Keep me posted! |
Why is Record at a different version? Are all packages at the correct version? |
Looking at the screenshot, it seems as if the lockfile is using the yarn v1 format. Agree with @thedavidprice , updating CI to use FWIW in some of my personal projects where I use Yarn 3, I have noticed that dependabot will clobber my yarn v3 formatted lockfile and replace it with a v1 format. This results in the exact same Post-resolution validation errors. |
@thedavidprice hum that's a mistake indeed - it's a preproduction branch and I had a branch for RW version bump and one which introduced RW records, both were not at the same version indeed. Nevertheless, I recreated the preproduction branch from main and only merged the version bump branch.
Which introduces the I still get the same error though. @virtuoushub is it something you have resolved in those projects? |
@noire-munich - yes ( I stopped using dependabot which stopped the lockfile clobber ) If I had to guess what is going on, something in the environment ( maybe |
I removed dependabot, still same problem with the lockfile - even after I cleaned yarn.lock. |
@noire-munich is there an example repo I can take a look at? |
@virtuoushub unfortunately we don't have such a repo and I'm not sure I can manage one in the coming two weeks at least - not quite sure what would need to be included in it. |
@virtuoushub Can this cause by the thing you said on slack about the engines of package.json, |
@simoncrypta , not sure; but this is a great callout! AFAIK So, @noire-munich, one quick thing to try is to make sure your ...
"engines": {
"node": ">=14.17 <=16.x",
"yarn": ">=3.2.0"
},
...
...
"packageManager": "[email protected]"
... What this should do is make sure that
👋🏻 @noire-munich , unfortunately I will not be available for a call. I outlined some things to try above. If those do not work to resolve the issue, and you do end up having a repo for me to take a look at, then I will be happy to help by checking it out. |
@virtuoushub No problem! Thanks a lot for the help 👍 Ok so I checked the two points:
I fixed according to your diff @virtuoushub , removed Only thing I eventually noticed is the ending line of that diff:
I do not understand what would make that happen in the github action I've provided above, which got corrected according to @thedavidprice 's smoke-tests. Last thing to know that should be brought to @simoncrypta 's attention: I upgraded to yarn 3 by using |
Ok, someone on the internets actually had something similar... Here it is: yarnpkg/berry#2948 So I additionally followed his steps, I cloned the repo in a new directory, checked out the proper branch, ran |
I agree. I brought this up with the core team. Will follow back up.
I don't quite follow. Does that mean by following the steps, you were able to resolve your issue? |
Your yarn.lock needs updating and/or is out if sync. Run Do you have a yarn.lock checked in? And updated? I know I could fix this for you fast. Sorry I don't have time right now :( |
No problem! I know why x). Also it's not critical to us, it would be a clear improvement for sure but the real motivation is to get v1 on time for launch week - just to be proud of being current. ( Also very curious about graphql-yoga ) Here's my latest attempt, I'm using
What does not appear in this is that I had to manually change
so, yep, @virtuoushub , issue is still not solved on my side :-. |
One thing to note here, AFAIK I suggested those edits to |
After a debugging session with @virtuoushub , we've hit another roadblock. Seems like we're missing a dependency:
A bit more context though on our progress :
|
Finally \o/ Thanks to @virtuoushub's time and knowledge, we've been able to figure this out. I've got a Redwood app and at root I have an So here are the changes we had to make:
At some point we've ran into a Docker issue, we needed to add git to the docker image, @virtuoushub I can confirm that this is not necessary. I'm leaving this opened until I can confirm a successful prod deploy. @thedavidprice @simoncrypta not sure how such edge case could be used. Maybe some topic in the forums? I've seen DT's similar posts of issues + resolution. Something else? |
Quick notes: The getting Another big take away is nodeLinker: node-modules this should have happened automatically via Learnings here might be to better document how drastic of a change yarn@3 is from yarn@1; imho from an end users perspective they should be thought of as separate tools (if anyone remembers AngularJS vs Angular 2+, the distinction between architectural differences in yarn@1 and yarn@2+ is very analogous). Also maybe have a diagnostic scan that warns if this is not configured? Also as a learning for the redwood framework as a whole, unless I am mistaken we can not really lean into |
Any updates on this? I'd like to take a look and help out otherwise. |
Hey all, I'm going to close this one. Certainly feel free to reopen and we can start discussing again if this is still a problem you are running into. |
We've bumped to v0.49.1 today in an attempt to finally get to yarn 3 - super excited.
Locally it runs very well and caused little troubles to upgrade.
The problem occurs when using a github action.
The workflow, truncated:
This part has been working well until now, and debugging proves to be rather difficult.
The action fails on step Create environment files and unfolding the details only show a diff of a file which should not have been edited outside of our local files. There is no explicit error message:
The text was updated successfully, but these errors were encountered: