-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Bug: Yarn fails to install (Exit code: 128) #3303
Comments
Same thing, happened after
|
Oh yes, if you fail to proceed with yarn install because of this error, just delete your lockfile ( |
I think this can result from trying to install a deleted git branch as well - I was using a custom fork over here apollographql/graphql-tag#52, but when it got merged/deleted, I started encountering a similar error:
Where on the last line, was the commit hash of the deleted branch. I switched to the main branch since the pull request had been merged, for my fix. |
I think I found the reason for my original error. I think one of the packages that was linked to a branch had a commit deleted, or force-pushed updates. Unfortunately, I don't know for sure and the yarn error message does not make it clear if that was the case or not. |
I think there are several issues discussed here. |
I was getting the same error when trying to
Using WSL. Seems like it cannot remove the old directory properly. I know this is probably unrelated to yarn, but thought I'd post anyways for information purposes. |
I got this same error. I was able to reproduce and fix the issue (it was direct mistake from me). Basically, I have a git dependency (and it's pointing a branch) that is tracked in the yarn lockfile. At some point during the day, I force pushed my git branch which clobbered the tracked sha. I verified that the clobbered sha was the The fix was to |
I tend to get this error when using a github dependency and switching between branches.
Fix it by deleting: I think yarn is reusing the cache directory, but git doesn't like overwriting one branch with another in that directory. |
I solved it by removing the enire yarn cache (/Users//Library/Caches/Yarn) |
yarn cache clean
rm yarn.lock
rm -rf node_modules/ and then run yarn |
same here |
Thank you @rally25rs. You helped me a lot! |
Thanks! This works for me. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Yarn fails to install and does not provide any helpful error message for debugging. I have already done this:
..but it has not made any difference.
If the current behavior is a bug, please provide the steps to reproduce.
Yarn seems to install in other projects. Inspecting the directory that is mentioned in the output:
What is the expected behavior?
I expect install to succeed or at least provide an actionable error message.
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: