I am working on react native application without Expo. I am trying to use react-native-video package. Also I am running project in Xcode with cocoapods.
Here is my pod file:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'myprj' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for myprj
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport'
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# Third party deps podspec link
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'
pod 'react-native-video', :path => '../node_modules/react-native-video'
target 'myprj-tvOSTests' do
inherit! :search_paths
# Pods for testing
pod 'react-native-video', :path => '../node_modules/react-native-video'
end
target 'myprjTests' do
inherit! :search_paths
# Pods for testing
end
end
Now when I am trying to run project its giving below error:
node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:37:9: fatal error: 'jsireact/JSIExecutor.h' file not found
Please suggest me for solution of it, as I tried to search but didn't find any solution.
Please check this screenshot as well.
Please find my package.json
{
"name": "myprj",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"immutability-helper": "^3.0.0",
"prop-types": "^15.6.2",
"react": "16.6.3",
"react-native": "0.58.3",
"react-native-deprecated-custom-components": "^0.1.2",
"react-native-video": "^4.3.1"
},
"devDependencies": {
"babel-core": "7.0.0-bridge.0",
"babel-jest": "24.0.0",
"jest": "24.0.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
Update: This has been resolved in react-native: "0.58.5"
and greater.
The issue is with HEADER SEARCH PATHS
in the React Native subspec for jsiexecutor
on the master
branch of "react-native": "0.58.3"
Source: https://github.com/facebook/react-native/pull/23274/files
Temporary fix:
Open React.podspec
found in node_modules/react-native/React.podspec
Update HEADER_SEARCH_PATHS
of jsiexecutor
subspec to read:
s.subspec "jsiexecutor" do |ss|
ss.dependency "React/cxxreact"
ss.dependency "React/jsi"
ss.dependency "Folly", folly_version
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/jsiexecutor/jsireact/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jsiexecutor/jsireact/*.h"
ss.header_dir = "jsireact"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\", \"$(PODS_TARGET_SRCROOT)/ReactCommon/jsiexecutor\"" }
end
pod update
This is now been fixed in react-native 0.58.5
, which now should be working without manually patching the podspec
file.
React native release notes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With