question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Patch react-native 0.59.9 failed

See original GitHub issue

Looks like it’s due to many new files generated under new directory “third-party” after I build my project. I can fix it by excluding that directory: yarn patch-package react-native --exclude third-party

Below is the error log if not exclude: `yarn patch-package react-native yarn run v1.16.0 $ /Users/samuel.cai/Documents/app/node_modules/.bin/patch-package react-native patch-package 6.2.0 • Creating temporary folder • Installing react-native@0.59.9 with yarn • Diffing your files with clean files

{ error: Error: spawnSync git ENOBUFS at Object.spawnSync (internal/child_process.js:1041:20) at Object.spawnSync (child_process.js:602:24) at Function.spawnSync [as sync] (/Users/samuel.cai/Documents/app/node_modules/patch-package/node_modules/cross-spawn/index.js:26:23) at Object.exports.spawnSafeSync (/Users/samuel.cai/Documents/app/node_modules/patch-package/dist/spawnSafe.js:10:32) at git (/Users/samuel.cai/Documents/app/node_modules/patch-package/dist/makePatch.js:104:32) at Object.makePatch (/Users/samuel.cai/Documents/app/node_modules/patch-package/dist/makePatch.js:135:26) at /Users/samuel.cai/Documents/app/node_modules/patch-package/dist/index.js:48:25 at Array.forEach (<anonymous>) at Object.<anonymous> (/Users/samuel.cai/Documents/app/node_modules/patch-package/dist/index.js:47:22) at Module._compile (internal/modules/cjs/loader.js:774:30) { errno: ‘ENOBUFS’, code: ‘ENOBUFS’, syscall: ‘spawnSync git’, path: ‘git’, spawnargs: [ ‘diff’, ‘–cached’, ‘–no-color’, ‘–ignore-space-at-eol’, ‘–no-ext-diff’ ] }, status: null, signal: ‘SIGTERM’, output: [ null, <Buffer 64 69 66 66 20 2d 2d 67 69 74 20 61 2f 6e 6f 64 65 5f 6d 6f 64 75 6c 65 73 2f 72 65 61 63 74 2d 6e 61 74 69 76 65 2f 4c 69 62 72 61 72 69 65 73 2f 41 … 1056718 more bytes>, <Buffer > ], pid: 87610, stdout: <Buffer 64 69 66 66 20 2d 2d 67 69 74 20 61 2f 6e 6f 64 65 5f 6d 6f 64 75 6c 65 73 2f 72 65 61 63 74 2d 6e 61 74 69 76 65 2f 4c 69 62 72 61 72 69 65 73 2f 41 … 1056718 more bytes>, stderr: <Buffer > }

/Users/samuel.cai/Documents/app/node_modules/patch-package/dist/makePatch.js:181 throw e; ^ { error: Error: spawnSync git ENOBUFS at Object.spawnSync (internal/child_process.js:1041:20) at Object.spawnSync (child_process.js:602:24) at Function.spawnSync [as sync] (/Users/samuel.cai/Documents/app/node_modules/patch-package/node_modules/cross-spawn/index.js:26:23) at Object.exports.spawnSafeSync (/Users/samuel.cai/Documents/app/node_modules/patch-package/dist/spawnSafe.js:10:32) at git (/Users/samuel.cai/Documents/app/node_modules/patch-package/dist/makePatch.js:104:32) at Object.makePatch (/Users/samuel.cai/Documents/app/node_modules/patch-package/dist/makePatch.js:135:26) at /Users/samuel.cai/Documents/app/node_modules/patch-package/dist/index.js:48:25 at Array.forEach (<anonymous>) at Object.<anonymous> (/Users/samuel.cai/Documents/app/node_modules/patch-package/dist/index.js:47:22) at Module._compile (internal/modules/cjs/loader.js:774:30) { errno: ‘ENOBUFS’, code: ‘ENOBUFS’, syscall: ‘spawnSync git’, path: ‘git’, spawnargs: [ ‘diff’, ‘–cached’, ‘–no-color’, ‘–ignore-space-at-eol’, ‘–no-ext-diff’ ] }, status: null, signal: ‘SIGTERM’, output: [ null, <Buffer 64 69 66 66 20 2d 2d 67 69 74 20 61 2f 6e 6f 64 65 5f 6d 6f 64 75 6c 65 73 2f 72 65 61 63 74 2d 6e 61 74 69 76 65 2f 4c 69 62 72 61 72 69 65 73 2f 41 … 1056718 more bytes>, <Buffer > ], pid: 87610, stdout: <Buffer 64 69 66 66 20 2d 2d 67 69 74 20 61 2f 6e 6f 64 65 5f 6d 6f 64 75 6c 65 73 2f 72 65 61 63 74 2d 6e 61 74 69 76 65 2f 4c 69 62 72 61 72 69 65 73 2f 41 … 1056718 more bytes>, stderr: <Buffer > } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:6
  • Comments:9

github_iconTop GitHub Comments

5reactions
brusseecommented, Mar 4, 2021

Seems to be duplicate of #166

edit: Solution I’m using: https://github.com/ds300/patch-package/issues/166#issuecomment-611002963

edit2: #166 is fixed in v6.4.5 https://github.com/ds300/patch-package/issues/166#issuecomment-790453513 @caisd1998 Does this resolve your issue?

2reactions
laurent22commented, Nov 14, 2019

Just to add that --include works for me too

Somehow it doesn’t work for me and I get the same error as above.

Eventually I just did diff -u oldFile.java newFile.java > newFile.patch and renamed it to whatever name patch-package expects.

It feels like there should be some optimisation when --include is specified, while now it’s processing everything anyway and just filters the relevant files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix error in React-Native@0.59.9 IOS Build
I faced this issue with React Native version 0.61.2 and this worked for me. Navigate to the ios folder of the app and...
Read more >
React Native SDK Troubleshooting - Visual Studio App Center
This error appears when RN core libraries aren't referenced correctly, which can be caused by different kinds of integrating or linking issues.
Read more >
react-native-agora - npm
Start using react-native-agora in your project by running `npm i react-native-agora`. ... Pod install failed (React Native >= 0.62.0).
Read more >
Upgrading React Native to version 0.59 and beyond: a step-by ...
There are a couple of reasons why you should update your React Native app on a ... I see a “Could not find...
Read more >
Upgrading to React Native 0.60 - YouTube
Here are some quick tips if you're a developer upgrading his/her react native project from 0.59 or lower version to 0.60.0Strictly follow ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found