Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to apply patch for package

I tried to run a new React Native (Android) project I got from somebody. When I run yarn install, the following error happens. How can I fix this ? I am new to react native.

patch-package: Applying patches...

**ERROR** Failed to apply patch for package react-native-confirmation-code-input

  This error was caused because Git cannot apply the following patch file:

    patches/react-native-confirmation-code-input+1.0.4.patch

  This is usually caused by inconsistent whitespace in the patch file.  
like image 493
kylas Avatar asked Feb 14 '26 11:02

kylas


1 Answers

For anyone having this problem, this isn't a React-Native problem per se, it's because the library patch-package is trying to apply a patch for "react-native-confirmation-code-input" and fails.

This is mostly caused when the patch is created in Linux/MacOS and then used in Windows, because of EoL differences.

like image 120
Tomás Avatar answered Feb 17 '26 11:02

Tomás



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!