Failed to apply patch for package react-native at path node_modules/react-native
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 325
- PR merge metrics
- No merged PRs in 30d
Description
The "Use of bitwise '|' with boolean operands" error is fixed in React Native 0.69+. But we are currently using react-native 0.63.5, we have to apply the following patch to fix the issue in node_modules when buiding circle-CI:
react-native+0.63.5.patch:
======================
@@ -24,6 +24,28 @@ index c17c76d..9d5aaaf 100644
}
}
}
diff --git a/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp b/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp
index d916a45..1c7207a 100644
--- a/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp
+++ b/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp
@@ -2[28](https://bitbucket.org/aptosretail/scp-client-rn-store-selling/pull-requests/5681#Lpatches/react-native+0.63.5.patchT28)2,7 +2282,7 @@ static float YGDistributeFreeSpaceSecondPass(
depth,
generationCount);
node->setLayoutHadOverflow(
- node->getLayout().hadOverflow() |
+ node->getLayout().hadOverflow() ||
currentRelativeChild->getLayout().hadOverflow());
}
return deltaFreeSpace;
@@ -[30](https://bitbucket.org/aptosretail/scp-client-rn-store-selling/pull-requests/5681#Lpatches/react-native+0.63.5.patchT30)43,7 +3043,7 @@ static void YGNodelayoutImpl(
}
node->setLayoutHadOverflow(
- node->getLayout().hadOverflow() |
+ node->getLayout().hadOverflow() ||
(collectedFlexItemsValues.remainingFreeSpace < 0));
// STEP 6: MAIN-AXIS JUSTIFICATION & CROSS-AXIS SIZE DETERMINATION
diff --git a/node_modules/react-native/scripts/.packager.env b/node_modules/react-native/scripts/.packager.env
new file mode 100644
index 0000000..[36](https://bitbucket.org/aptosretail/scp-client-rn-store-selling/pull-requests/5681#Lpatches/react-native+0.63.5.patchT36)1f5fb
=======================
But when this patch is being applied in circle-CI build, I kept getting the following error:
**ERROR** Failed to apply patch for package react-native at path
node_modules/react-native
This error was caused because patch-package cannot apply the following patch file:
patches/react-native+0.63.5.patch
Try removing node_modules and trying again. If that doesn't work, maybe there was
an accidental change made to the patch file? Try recreating it by manually
editing the appropriate files and running:
patch-package react-native
If that doesn't work, then it's a bug in patch-package, so please submit a bug
report. Thanks!
https://github.com/ds300/patch-package/issues
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.