kylas
kylas

Reputation: 1455

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.  

Upvotes: 14

Views: 5438

Answers (1)

Tomás
Tomás

Reputation: 33

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.

Upvotes: 2

Related Questions