-
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
Error: Couldn't find the binary git #2083
Comments
What's the result of |
That's a different path to |
+1 - same problem macOS 10.12.1
and on windows 7 and 10 with git-scm |
I have the same problem under ubuntu 16.04, dans yarn 18.1. The reported error is bad: This is because of the
However, supportArchive can change while nothing was cloned (https://github.com/yarnpkg/yarn/blob/master/src/util/git.js#L338). |
Same thing happened to me after a Removing the |
this happens here too after |
I am experiencing this issue too. I started seeing it after running I use a Mac |
Unfortunately even deleting node_modules/ doesn't fix the problem |
This seems to happen to me when using a "git+ssh" dependency where the commit hash is not at the HEAD of the branch. For example, my lockfile contains something like:
At first, a5e6897042a496d70dbc57b1de8f8df5e8c0369c was the HEAD of the repo and yarn install worked fine. But when I committed some new revs to foo-bar-baz.git without updating the lockfile of the package making use of foo-bar-baz (because I didn't need to yet), then a5e6897042a496d70dbc57b1de8f8df5e8c0369c still exists in the repo and npm can install it just fine. If I manually change the commit hash in the lockfile to whatever the HEAD commit hash is in foo-bar-baz.git, Starting with an empty cache definitely triggers this behavior. Starting with previously cached packages may or may not trigger it. Not sure why. Happens with yarn 0.18.1 and 0.19.1. Node 6.9.1 |
Had the same problem as @sirbarrence . After removing the lockfile it worked again |
Thanks @sirbarrence - that was spot on. If the commit referred to in |
Thanks @vitch that can work for local development. For automated builds where manual intervention is undesirable or builds where you can't use the HEAD of the dependency yet for compatibility reasons, I'm having to consider reverting to npm until this is resolved. |
Seeing this as well - exactly the same setup as @sirbarrence Looks like it might be fixed in 0.20 - https://github.com/yarnpkg/yarn/releases/tag/v0.20.0 |
I confirm that 0.20 fixes it |
Happens with Windows8 yarn 0.20.3 Node 6.9.5. E:\codes\js\react\relax-master>yarn --version E:\codes\js\react\relax-master>node -v E:\codes\js\react\relax-master>yarn install |
I was having this same issue on yarn |
I cannot experience this problem locally, but my CI (Drone CI) keeps hitting this problem. We have the same yarn version. |
@alansouzati I believe you need to install git previously, for example: pipeline:
test:
image: node:7-alpine
commands:
- apk add --no-cache git
- yarn |
thanks @ricardogama, my CI is passing now. |
I think this issue should be marked as resolved now. |
I'm seeing this issue on Ubuntu 16.04, because nodejs is still at version 4... If I upgrade to 6.. it seems to fix it. |
Closed since this seems to be resolved in recent versions. |
Yep - definitely resolved for me. |
Delete yarn.lock file |
@ricardogama thanks, i have same problem in |
This issue is still occurring for me when run on my Jenkins server (although fine locally). Node: 12.6.0 I can find the full repository that I am trying to install in the Yarn/Cache folder, so the failure must be occuring after yarn performs the git clone (so yarn also clearly has access to the git binary at some point to be able to clone) I tried the various git+ssh://... suggestions above with no success. Any other ideas? |
Hey! I found that problem occurs in case when you add a dependency, this way
after I changed this line to
the problem is gone |
Thanks, this is working for me now |
I solved this error by installing git on my computer |
Sometimes it could be just that path to git is not added to the PATH environmental variable. |
Install git at https://git-scm.com/ |
This caused my build to just hang forever |
simply install git on your system |
|
Have you correctly set your PATH to point at your Git installation? You need to add the following paths to PATH: C:\Program Files\Git\bin |
Can u please elaborate how you had done this ?? |
Had to restart windows my PC then it worked after doing this (y) |
this will try to fix the yarn error Couldn't find the binary git see yarnpkg/yarn#2083
If you get this error when executing RUN apk add --no-cache git |
### Install Git In your Computer. https://git-scm.com/ |
Yes, Delete The |
Hello I have same problem with lunching an yarn. When I lunch commend yarn it write me this (look bold text): yarn install v1.22.19 Can somebody help me, please?? |
@LAART66 you need to install Git on your computer |
I wonder why this is still necessary on my end when trying to install & build an app inside a docker? RUN apk add --no-cache git |
Because I think that you can build without |
I am using:
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Trying to install packages using yarn. Outputs a strange error message:
If the current behavior is a bug, please provide the steps to reproduce.
Outputs the above error message.
Git is installed:
What is the expected behavior?
Yarn should install the packages without emitting an error about git. If I run this command using an older version of yarn, v0.16.1, everything is fine.
The text was updated successfully, but these errors were encountered: