首页 > 解决方案 > 为包打补丁失败

问题描述

我试图运行我从某人那里得到的一个新的 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.  

标签: javascriptreact-native

解决方案


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

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


推荐阅读