Error while linking for react-native 0.41.2
This happens for fresh project created with react-native 0.41.2
yarn add react-native-firestack
react-native link react-native-firestack
Preparing to link react-native-firestack for iOS
Checking CocoaPods...
CocoaPods already installed
rnpm-install info Linking react-native-firestack android dependency
rnpm-install info Android module react-native-firestack has been successfully linked
rnpm-install info Linking react-native-firestack ios dependency
rnpm-install info iOS module react-native-firestack has been successfully linked
Checking Podfile in iOS project (/Users/sheerun/Source/Projects/firenative/ios/Podfile)
Adding Podfile to iOS project
Installing Pods
Analyzing dependencies
[!] The target `firenative-tvOSTests` is declared twice.
/Users/sheerun/Source/Projects/firenative/node_modules/react-native/local-cli/core/makeCommand.js:29
throw new Error(`Error occured during executing "${command}" command`);
^
Error: Error occured during executing "node_modules/react-native-firestack/bin/cocoapods.sh" command
at ChildProcess.prelink (/Users/sheerun/Source/Projects/firenative/node_modules/react-native/local-cli/core/makeCommand.js:29:15)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5
react-native --version
react-native-cli: 2.0.1
react-native: 0.41.2
Also, the Podfile that is produced:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'firenative' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for firenative
target 'firenative-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'firenativeTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'firenative-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for firenative-tvOS
target 'firenative-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
platform :ios, '8.0'
[
'Firebase',
'Firebase/Core',
'Firebase/Auth',
'Firebase/Storage',
'Firebase/Database',
'Firebase/RemoteConfig',
'Firebase/Messaging'
].each do |lib|
pod lib
end
I'm having that issue too.
i had to delete this from PodFile. and worked
delete this
target 'firenative-tvOS' do
Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
Pods for firenative-tvOS
target 'firenative-tvOSTests' do inherit! :search_paths # Pods for testing end
Yeah I know, but it shound't be generated in the first place. It's a duplicate.
I'm having this issue too
I'm having this issue as well trying to link Auth0 Lock. Save version of react-native. So it's probably an issue with rnpm or react-native and not this repo. I did the same thing as @tuguScript and it worked as well.