-
-
Notifications
You must be signed in to change notification settings - Fork 300
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: Error: spawnSync git ENOBUFS #166
Comments
This only happens when I was trying to patch the |
I don't think this should be closed. It would be cool to have a way to ignore these files. |
@brunolemos , why was this closed? I get the same error when I tried to patch I ran
|
Happens to me as well, and the file being added only contains a few bytes. |
i've the same problem |
@alepri51 I temporarily worked around it and managed to create my patch by going to:
and added an extra option called now the code looks like this:
and my patch was created successfully. |
Thank you, this helped. So we now need to |
Hahaha yep |
This seems to be in a high priority |
Here is a gist with the patch by @SudoPlz I'm using successfully: https://gist.github.com/brussee/e382ed12ca007a88170289e54b526063 |
Can we get this fixed, possibly by upping the default I just ran into this too, and while it is incredibly meta to have to patch |
@Timebutt would it not be better to allow passing a maxBuffer param? There is a discussion of the same kind of problem in the Lerna repo here: lerna/lerna#479 It would also be nice to know what the buffer defaults to. This issue comes up quite often when patching react-native packages for older repos as they could have some post-install steps which generate a large number of files. |
Hit this when trying to patch the |
So we basically need to patch the |
Run into the same issue. Artificially raising the maxBuffer seems to me a bit too much. I'd vote for cleaner message ("File too big: . Please raise --maxBuffer to over ") and option to change maxBuffer and optionally make it automatically adjust (check size of all files, if they are bigger than buffer than raise the bar before spawning git diff). |
To be honest if we raise maxBuffer to 2 mb it may fix everyone's issue ... just saying .. |
A fix for this was just released in v6.4.5. Thanks to @nomi9995 for making the PR 🙏🏼 |
It seems too much for me, but it would fix the issue :) In my case I was patching react native packages and when patching i had the build folder from android (build artifacts) included in the patch.. and that raised the current issue. Simply removing that and being more mindful of the things actually added in the patch, would be my recommended way of handling situations like this. |
Summary: Fixes [this issue](ds300/patch-package#166) Test Plan: 1. Make sure `patch-package react-native` works without needing to manually patch `patch-package` 2. Make sure `yarn cleaninstall` works and still patches correctly Reviewers: palys-swm Subscribers: KatPo, Adrian, atul Differential Revision: https://phabricator.ashoat.com/D1086
Still failing for me with 6.4.7 |
@hirbod can you try to increase maxBuffer and try again? |
My patch-package version is 6.4.7 and maxBuffer: 1024 * 1024 * 100 already added in the makePatch file. I still get this error |
Got it fixed by increasing maxBuffer to maxBuffer: 2048 * 1024 * 100 |
Happened for me with |
That adds more issue, do check the diff file manually. If 1024 * 1024 * 100 is not working, means the diff is getting too large. Is it intentional? For me, it was no. Some random file diffs got added. Had to cleanup the diff manually. |
Update lib helped me ;D |
I also have the same problem with the version 8.0.0 |
Small reproduction:
Create an empty folder with only one file:
package.json
Make some changes inside
node_modules/react-window/dist
filesnpx patch-package react-window
If fails with error below:
The text was updated successfully, but these errors were encountered: