-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'React/RCTImageLoader.h' file not found #1141
'React/RCTImageLoader.h' file not found #1141
Comments
Can you try with this? #1136 |
Tried, still the same error, also the above link does not address React/RCTImageLoader.h not found issue, the file RNSVGImage.m still uses RCTImageLoader.h, which does not exist in React folder, I am using react-native 0.61.2 version. |
Same problem here. Not working for me either. Trying to upgrade RN from 0.60.6 to 0.61.0 |
I tried to solve it myself, it works for me |
@idoor88 I followed all your steps to create a new blank project with only RNSVG and when I ran the project got an error complaining about the dependency RNCAsyncStorage. So I added the lib
Then my project started running again. Updated to 0.61 successfully It wasn't necessary to modify the header file. So your code won't break after every pod install you do. |
@Eukki I did as you instructed but i was confused what do the |
@omars94 Sorry, I met -lReact and a similar error and it was not related to the |
Has anyone tested if this patch works with older versions of react-native? |
I just realized you're probably hitting the issue which is documented in the readme: https://github.com/react-native-community/react-native-svg#ios-pre-rn-060 If cocoapods is used and if error RNSVGImage.m:12:9: 'React/RCTImageLoader.h' file not found occurs: Add the following entry in Podfile: pod 'React', :path => '../node_modules/react-native', :subspecs => [
[...]
'RCTImage', # <-- Add RCTImage
] and run pod install from ios folder |
At least, when I make a clean project, and add react-native-svg, it builds fine, but gives a deprecation warning. And RCTImageLoader.h certainly exists in React-Core/CoreModulesHeaders/ and RCTImageLoader.mm in React-CoreModules/ in v0.61.2 of react-native |
Can you try with the latest commit from the develop branch? 5452144 |
in the [email protected]. React-RCTImage is a independent module. the pod file is like this
|
thank you for replaying me. this commit |
@zhonglaoban My Podfile from the fresh project looks like this: platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'AwesomeProjectRN0612' do
# Pods for AwesomeProjectRN0612
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
target 'AwesomeProjectRN0612Tests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'AwesomeProjectRN0612-tvOS' do
# Pods for AwesomeProjectRN0612-tvOS
target 'AwesomeProjectRN0612-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end The files are in the React-CoreModules pod, not React-RCTImage, as they're part of the bridge. |
But I suspect this commit is a breaking change, I'm not sure when those files were introduced, or how it affects the cocoapods configuration in older versions of react-native. Should probably change it from a fix to breaking at least. |
I think i found a backwards compatible way to handle it now. So no need to mark it breaking. |
when using the |
Well, the change fixes a deprecation warning anyway, so no need to revert it either. Good to know the issue was Podfile related. |
# [9.12.0](v9.11.1...v9.12.0) (2019-10-19) ### Bug Fixes * handle setting transform attribute on clipPath, fixes [#1152](#1152) ([73b21d1](73b21d1)) * improve handling of transform attribute on clipPath, fixes [#1152](#1152) ([3aa126e](3aa126e)) * **ios:** backwards compatible RCTImageLoader.h handling fixes [#1141](#1141) ([3c22c97](3c22c97)) * **ios:** clipPath rendering, fixes [#1131](#1131) ([2534537](2534537)) * **ios:** deprecation of RCTImageLoader fixes [#1141](#1141) ([5452144](5452144)) * **ios:** fix changes in color/currentColor/tintColor, fixes [#1151](#1151) ([0c7e94d](0c7e94d)) * **ios:** image viewBox opposite handling of y alignment, fixes [#1138](#1138) ([c69e9e2](c69e9e2)) * **js:** allow setting stopColor/Opacity/Offset using styles, fix [#1153](#1153) ([5984e06](5984e06)) * getPointAtLength signature ([2c57af2](2c57af2)) * getScreenCTM calculation ([5c5072d](5c5072d)) * improve native method spec conformance ([c63f9e2](c63f9e2)) * improve types for getBBox ([cecde7d](cecde7d)) * prepare script ([9a3dc4e](9a3dc4e)) * **ios:** memory leak in tspan, fixes [#1073](#1073) ([974f3a8](974f3a8)) * fix native methods spec conformance ([ecedb21](ecedb21)) * Make native methods synchronous ([8ce7611](8ce7611)) * refine types for matrix helpers ([409af91](409af91)) * refine types for matrix helpers ([7a3f867](7a3f867)) * **android:** defineMarker/getDefinedMarker storage ([e6eda84](e6eda84)) * **android:** native method scaling and getScreenCTM offset ([f3e0b19](f3e0b19)) * native method signatures web compatibility / spec conformance ([8687a3d](8687a3d)) * **ios:** optimize extractPathData, clear PathMeasure when no textPath ([df69c26](df69c26)) ### Features * **flow:** add flowgen to generate flow types from typescript, [#1125](#1125) ([fcd66fb](fcd66fb)) * implement getBBox, getCTM, getScreenCTM ([f13d54a](f13d54a)) * implement isPointInStroke ([2ba64df](2ba64df)) * initial implementation of isPointInFill ([203e53b](203e53b)) * support using native methods using promises instead of callbacks ([c28499b](c28499b)) * **android:** implement getTotalLength and getPointAtLength ([cd667d0](cd667d0)) * **ios:** implement getTotalLength and getPointAtLength ([78c4f20](78c4f20))
🎉 This issue has been resolved in version 9.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
After encountering this error while upgrading to RN 0.61.4 I bumped react-native-svg to 9.12.0(also tried 9.13.3) and got an error |
Have you tried running pod install and cleaning the build? |
Yes, no change.
On Sat, Nov 9, 2019 at 6:17 PM Mikael Sand ***@***.***> wrote:
Have you tried running pod install and cleaning the build?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1141>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATUMT2GZXWCBEFJX5OO5QDQS5AHVANCNFSM4I7ASZHQ>
.
--
*Brad Wertman*
|
Sorry, I hadn't since installing with npm. That was it. Thanks! |
Ran into this issue with react-native 0.61.4Fixed Adding these entries to Podfile:
then ran
|
# [9.12.0](software-mansion/react-native-svg@v9.11.1...v9.12.0) (2019-10-19) ### Bug Fixes * handle setting transform attribute on clipPath, fixes [#1152](software-mansion/react-native-svg#1152) ([73b21d1](software-mansion/react-native-svg@73b21d1)) * improve handling of transform attribute on clipPath, fixes [#1152](software-mansion/react-native-svg#1152) ([3aa126e](software-mansion/react-native-svg@3aa126e)) * **ios:** backwards compatible RCTImageLoader.h handling fixes [#1141](software-mansion/react-native-svg#1141) ([3c22c97](software-mansion/react-native-svg@3c22c97)) * **ios:** clipPath rendering, fixes [#1131](software-mansion/react-native-svg#1131) ([2534537](software-mansion/react-native-svg@2534537)) * **ios:** deprecation of RCTImageLoader fixes [#1141](software-mansion/react-native-svg#1141) ([5452144](software-mansion/react-native-svg@5452144)) * **ios:** fix changes in color/currentColor/tintColor, fixes [#1151](software-mansion/react-native-svg#1151) ([0c7e94d](software-mansion/react-native-svg@0c7e94d)) * **ios:** image viewBox opposite handling of y alignment, fixes [#1138](software-mansion/react-native-svg#1138) ([c69e9e2](software-mansion/react-native-svg@c69e9e2)) * **js:** allow setting stopColor/Opacity/Offset using styles, fix [#1153](software-mansion/react-native-svg#1153) ([5984e06](software-mansion/react-native-svg@5984e06)) * getPointAtLength signature ([2c57af2](software-mansion/react-native-svg@2c57af2)) * getScreenCTM calculation ([5c5072d](software-mansion/react-native-svg@5c5072d)) * improve native method spec conformance ([c63f9e2](software-mansion/react-native-svg@c63f9e2)) * improve types for getBBox ([cecde7d](software-mansion/react-native-svg@cecde7d)) * prepare script ([9a3dc4e](software-mansion/react-native-svg@9a3dc4e)) * **ios:** memory leak in tspan, fixes [#1073](software-mansion/react-native-svg#1073) ([974f3a8](software-mansion/react-native-svg@974f3a8)) * fix native methods spec conformance ([ecedb21](software-mansion/react-native-svg@ecedb21)) * Make native methods synchronous ([8ce7611](software-mansion/react-native-svg@8ce7611)) * refine types for matrix helpers ([409af91](software-mansion/react-native-svg@409af91)) * refine types for matrix helpers ([7a3f867](software-mansion/react-native-svg@7a3f867)) * **android:** defineMarker/getDefinedMarker storage ([e6eda84](software-mansion/react-native-svg@e6eda84)) * **android:** native method scaling and getScreenCTM offset ([f3e0b19](software-mansion/react-native-svg@f3e0b19)) * native method signatures web compatibility / spec conformance ([8687a3d](software-mansion/react-native-svg@8687a3d)) * **ios:** optimize extractPathData, clear PathMeasure when no textPath ([df69c26](software-mansion/react-native-svg@df69c26)) ### Features * **flow:** add flowgen to generate flow types from typescript, [#1125](software-mansion/react-native-svg#1125) ([fcd66fb](software-mansion/react-native-svg@fcd66fb)) * implement getBBox, getCTM, getScreenCTM ([f13d54a](software-mansion/react-native-svg@f13d54a)) * implement isPointInStroke ([2ba64df](software-mansion/react-native-svg@2ba64df)) * initial implementation of isPointInFill ([203e53b](software-mansion/react-native-svg@203e53b)) * support using native methods using promises instead of callbacks ([c28499b](software-mansion/react-native-svg@c28499b)) * **android:** implement getTotalLength and getPointAtLength ([cd667d0](software-mansion/react-native-svg@cd667d0)) * **ios:** implement getTotalLength and getPointAtLength ([78c4f20](software-mansion/react-native-svg@78c4f20))
After installing the version 9.11.1, I did pod install, I got the issue with react-native-svg:
'React/RCTImageLoader.h' file not found:
I have RN 0.61.2 and "react-native-svg": "^9.11.1"
I did fresh pod install with react-native-svg pod, also It was mentioned here that RCTImageLoader.h is removed from RCTImage:
pilot4u/react-native-fs@05097bc
So what is the solution?
Steps to reproduce:
pod 'RNSVG', :path => '../node_modules/react-native-svg'
My System:
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 436.19 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.4.0 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 27.0.3, 28.0.2, 28.0.3
System Images: android-22 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
npmGlobalPackages:
react-native-asset: 2.0.0
react-native-cli: 2.0.1
react-native-cn-richtext-editor: 1.0.33
react-native-git-upgrade: 0.2.7
The text was updated successfully, but these errors were encountered: