未能为软件包应用补丁

kyl*_*las 12 javascript react-native

我试图运行我从某人那里得到的一个新的 React Native (Android) 项目。当我运行 yarn install 时,出现以下错误。我怎样才能解决这个问题 ?我是本机反应的新手。

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.  
Run Code Online (Sandbox Code Playgroud)

小智 2

对于遇到此问题的任何人来说,这本身并不是 React-Native 问题,而是因为库补丁包尝试为“react-native-confirmation-code-input”应用补丁并失败。

这主要是由于 EoL 差异,在 Linux/MacOS 中创建补丁然后在 Windows 中使用补丁时引起的。