-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: spawn git ENOENT on Windows 8 #3214
Comments
Do you have |
I am also seeing this behavior using the Jest that comes bundled with the create-react-app (Jest v 18.1.0). I'm running Windows 7 and node v4.4.3
Git is definitely available:
If I remove the git repository or set the |
I'm facing the same error on Windows 10. Only doesn't work on Zsh shell. Setting CI flag doesn't seem to fix it. |
I'm facing the same error on Windows 10, too. Current workaround to avoid this error is:
The On cmd.exe, npm test (jest) works well
On MSYS2 bash or zsh
Where this error comes from is jest-changed-filesIn git.js, there are childProcess.spawn calls. const child = childProcess.spawn('git', args, { cwd }); The 3rd argument
If replace unix style path with windows style path, Now I just found this, so I don't know who need to care about this. Thanks! |
@meltedice would you like to work on a proper fix and send a PR if you have some time? |
I tried some to create PR. On windows, it's easy to mix tools that uses different path style. I think a better way is make sure tools' path style, then use the same path style. My cmd.exe on windows environment:
My zsh on msys2 on windows environment:
My fixed zsh on msys2 on windows environment:
So my solution is add following into .bashrc or .zshrc for msys2: alias yarn="PATH=/c/Git/cmd/:\$PATH yarn"
alias npm="PATH=/c/Git/cmd/:\$PATH npm" If I can install another node.js version manager into msys2 system,
If there are unclear parts or something what I can do, let me know. Thanks, |
We currently don't have bandwidth to support these use cases, nor do we have Windows machines. If you'd like this to be fixed, please send us a PR. From our side, this is not really actionable, so I'm closing this issue. |
I was facing the same issue when using Cygwin. I was able to solve it renaming |
@GabrielDuarteM at this point of time this answer is incorrect :(,
to fix this we should parse this with we need a way to obtain root of git project as a WINDOWS path instead of cygwin path..., but without damn windows, why i'm still with you edit: |
Add CI=1 env var to work around an issue with jest on windows. See jestjs/jest#3214 (comment)
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
Report a bug.
What is the current behavior?
Bug 1
While running
jest --watch
on already changed JS files on Zsh, we have an error:Bug 2
While running
jest --watch
on already changed JS files on Bash, Jest acts like there's no changes at all.--no-cache
doesn't change anything in both of this processes.What is the expected behaviour?
I want to see no error and the result of all the tests of the diff shit.
Jest v19.0.2
Node v7.5.0
Windows 8
The text was updated successfully, but these errors were encountered: