Open kopax-polyconseil opened 2 years ago
I have the same issue with CircleCI breaking on patching the package react-native-document-picker
Creation of the patch:
patch-package react-native-document-picker
patch-package 6.4.7
• Creating temporary folder
• Installing react-native-document-picker@6.1.1 with yarn
• Diffing your files with clean files
✔ Created file patches/react-native-document-picker+6.1.1.patch
Package in yarn.lock
:
react-native-document-picker@^6.0.4:
version "6.1.1"
resolved "https://registry.yarnpkg.com/react-native-document-picker/-/react-native-document-picker-6.1.1.tgz#5ae72d489ea6d04f8325802570b1e24fc2c30a66"
integrity sha512-WcmPR/z+8dlPRqMCd+LwFXv9S/Q1gihf2lj/X2BVRxqQzQ+UEGo9mXjxcYB7mWKDkAqYS1MjdBcbfDycmTSs/A==
dependencies:
invariant "^2.2.4"
Error in CircleCI:
Worth to mention that other patches are applied successfully before this error
I also tried both suggestions in the error message
EDIT: After another attempt I managed to identify the modified line from the react-native-document-picker package provoking the failure. It's from its android/build.gradle
file where I commented the line buildToolsVersion safeExtGet('DocumentPicker_buildToolsVersion', '29.0.2')
. Commenting or removing this line repeatedly triggered the warning, and leaving it as is passed successfully
Patch when the line is removed:
diff --git a/node_modules/react-native-document-picker/android/build.gradle b/node_modules/react-native-document-picker/android/build.gradle
index 0d09fbf..5b45f21 100644
--- a/node_modules/react-native-document-picker/android/build.gradle
+++ b/node_modules/react-native-document-picker/android/build.gradle
@@ -2,7 +2,7 @@ buildscript {
if (project == rootProject) {
repositories {
google()
- jcenter()
+ mavenCentral()
}
dependencies {
@@ -19,7 +19,6 @@ def safeExtGet(prop, fallback) {
android {
compileSdkVersion safeExtGet('DocumentPicker_compileSdkVersion', 29)
- buildToolsVersion safeExtGet('DocumentPicker_buildToolsVersion', '29.0.2')
defaultConfig {
minSdkVersion safeExtGet('DocumentPicker_minSdkVersion', 21)
targetSdkVersion safeExtGet('DocumentPicker_targetSdkVersion', 29)
@@ -49,7 +48,7 @@ repositories {
url("$rootDir/../node_modules/react-native/android")
}
google()
- jcenter()
+ mavenCentral()
}
dependencies {
Patch when I leave the line as is
diff --git a/node_modules/react-native-document-picker/android/build.gradle b/node_modules/react-native-document-picker/android/build.gradle
index 0d09fbf..d96b45f 100644
--- a/node_modules/react-native-document-picker/android/build.gradle
+++ b/node_modules/react-native-document-picker/android/build.gradle
@@ -2,7 +2,7 @@ buildscript {
if (project == rootProject) {
repositories {
google()
- jcenter()
+ mavenCentral()
}
dependencies {
@@ -49,7 +49,7 @@ repositories {
url("$rootDir/../node_modules/react-native/android")
}
google()
- jcenter()
+ mavenCentral()
}
dependencies {
EDIT: After another attempt I managed to identify the modified line from the react-native-document-picker package provoking the failure. It's from its android/build.gradle file where I commented the line buildToolsVersion safeExtGet('DocumentPicker_buildToolsVersion', '29.0.2'). Commenting or removing this line repeatedly triggered the warning, and leaving it as is passed successfully
@SkipCat I'm seeing the same issue on netlify builds (see #375). The weird thing is that certain patches are able to apply without error whereas other patches fail. I haven't figured out which specific lines cause a failure.
solution: delete folder 'vue-pdf' npm install vue-pdf npm run postinstall success!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
solution: delete folder 'vue-pdf' npm install vue-pdf npm run postinstall success!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
package.json: "postinstall": "patch-package",
I have the following issue when using patch-package, the iOS version fail to install:
Then, Circle-CI breaks with:
I checked the
yarn.lock
and :So everything seems fine, why is this failing?