【问题标题】:Failed to apply patch for package为包打补丁失败
【发布时间】:2018-07-07 15:06:44
【问题描述】:

我尝试运行从某人那里获得的新 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.  

【问题讨论】:

    标签: javascript react-native


    【解决方案1】:

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

    这主要是在 Linux/MacOS 中创建补丁然后在 Windows 中使用时导致的,因为 EoL 差异。

    【讨论】:

      猜你喜欢
      • 2015-12-23
      • 2011-12-29
      • 1970-01-01
      • 1970-01-01
      • 2019-09-07
      • 2020-12-17
      • 2017-11-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多