Open ShaoGongBra opened 2 months ago
the same issue
+1
+1
+1
Facing the same issue.
+1
Adding install_modules_dependencies(s)
solved the issue for me.
Patch File:
diff --git a/package.json b/package.json
index 7a73b6e0d42d5eacd9d9d15017d019ed67a09a0a..408f7d6b3d79036518b4da904daa706eef15b241 100644
--- a/package.json
+++ b/package.json
@@ -169,12 +169,8 @@
]
},
"codegenConfig": {
- "libraries": [
- {
- "name": "RNImageResizerSpec",
- "type": "modules",
- "jsSrcsDir": "src"
- }
- ]
+ "name": "RNImageResizerSpec",
+ "type": "modules",
+ "jsSrcsDir": "src"
}
}
diff --git a/react-native-image-resizer.podspec b/react-native-image-resizer.podspec
index c7ba7d9e261abbb890cccf0c9dd58eba118083be..749803239f7765994408d525e3cf7cff787e847a 100644
--- a/react-native-image-resizer.podspec
+++ b/react-native-image-resizer.podspec
@@ -32,6 +32,7 @@ Pod::Spec.new do |s|
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
+ install_modules_dependencies(s)
end
end
Note: package.json
changes are related to warning shown while building (#413)
+1
+1
+1
This is reproducible easily when enabling the new arch on RN 0.75.4
@taboulot can you give it a look?
+1
I updated to react native 0.76.0 version and got this issue when using it 😢
+1 after enabling the new arch
the same issue using 0.76.1
+1
Same problem on react-native 0.76.1, expo 52.
Testing the workaround mentioned above seems to have fixed the build error, but I haven't launched the application to fully verify it. (I am still getting build errors from an unrelated dependency).
same issue "react-native": "0.76.1", "@bam.tech/react-native-image-resizer": "^3.0.10",
Faced the same issue in "react-native": "0.76.1"
Solved by Adding install_modules_dependencies(s)
below the line s.dependency "ReactCommon/turbomodule/core"
in node_modules/@bam.tech/react-native-image-resizer/react-native-image-resizer.podspec
OR
Without installing the patch, using post install,
inside script, "postinstall": "node ./scripts/fixPodspec.js"
in package.json
Create a file: scripts/fixPodspec.js
const fs = require('fs');
const path = require('path');
const podspecPath = path.resolve('node_modules/@bam.tech/react-native-image-resizer/react-native-image-resizer.podspec');
fs.readFile(podspecPath, 'utf8', (err, data) => {
if (err) {
console.error('Error reading podspec file:', err);
return;
}
// Check if the modification is already done, to avoid redundant edits
if (!data.includes('install_modules_dependencies(s)')) {
const modifiedData = data.replace(
's.dependency "ReactCommon/turbomodule/core"',
's.dependency "ReactCommon/turbomodule/core"\n install_modules_dependencies(s)'
);
fs.writeFile(podspecPath, modifiedData, 'utf8', (err) => {
if (err) {
console.error('Error writing podspec file:', err);
} else {
console.log('Podspec file updated successfully.');
}
});
}
});
Then run npm i
It works to me
it's work for me
Adding
install_modules_dependencies(s)
solved the issue for me.Patch File:
diff --git a/package.json b/package.json index 7a73b6e0d42d5eacd9d9d15017d019ed67a09a0a..408f7d6b3d79036518b4da904daa706eef15b241 100644 --- a/package.json +++ b/package.json @@ -169,12 +169,8 @@ ] }, "codegenConfig": { - "libraries": [ - { - "name": "RNImageResizerSpec", - "type": "modules", - "jsSrcsDir": "src" - } - ] + "name": "RNImageResizerSpec", + "type": "modules", + "jsSrcsDir": "src" } } diff --git a/react-native-image-resizer.podspec b/react-native-image-resizer.podspec index c7ba7d9e261abbb890cccf0c9dd58eba118083be..749803239f7765994408d525e3cf7cff787e847a 100644 --- a/react-native-image-resizer.podspec +++ b/react-native-image-resizer.podspec @@ -32,6 +32,7 @@ Pod::Spec.new do |s| s.dependency "RCTRequired" s.dependency "RCTTypeSafety" s.dependency "ReactCommon/turbomodule/core" + install_modules_dependencies(s) end end
Note:
package.json
changes are related to warning shown while building (#413)
Hy, thanks you. It's work for me.
Etape to fix this
Go to node_modules/@bam.tech/react-native-image-resizer/react-native-image-resizer.podspec
adding this install_modules_dependencies(s) after s.dependency "ReactCommon/turbomodule/core"
open package.json on same directory and replace content of "codegenConfig": { "libraries": [ { "name": "RNImageResizerSpec", "type": "modules", "jsSrcsDir": "src" } ] }
by this "codegenConfig": { "name": "RNImageResizerSpec", "type": "modules", "jsSrcsDir": "src" }
on terminal => yarn install or npm install and cd ios => exec bundle exec pod install on xcode, clean build and its work
RN0.75 opens a new architecture and packages IOS, resulting in this error