Matthew Woodington
Matthew Woodington

Reputation: 1

'Multiple commands produce' error when building react native expo app with react-native-firebase and react-native-filament

I keep getting this error when trying to build my app after adding firebase in order to use react-native-firebase/analytics.

dependencies:

"@react-native-firebase/analytics": "^21.10.0"

"@react-native-firebase/app": "^21.10.0"

"react-native-filament": "^1.5.1"

"expo-build-properties": "~0.12.5"

app.json:

"plugins": [
    "@react-native-firebase/app",
    [
        "expo-build-properties",
        {           
            "ios": {             
                "useFrameworks": "static"           
            }         
        }       
    ]     
]

getting this error:

 ❌  error: Multiple commands produce '/Users/mattw/Library/Developer/Xcode/DerivedData/ACSMobile-cplugwnjmazdasdksfekwwcpqpdl/Build/Products/Debug-iphoneos/react-native-filament/react_native_filament.framework/Headers/compiler.h'

duplicate output file '/Users/mattw/Library/Developer/Xcode/DerivedData/ACSMobile-cplugwnjmazdasdksfekwwcpqpdl/Build/Products/Debug-iphoneos/react-native-filament/react_native_filament.framework/Headers/compiler.h' on task: CpHeader /Users/mattw/Library/Developer/Xcode/DerivedData/ACSMobile-cplugwnjmazdasdksfekwwcpqpdl/Build/Products/Debug-iphoneos/react-native-filament/react_native_filament.framework/Headers/compiler.h /Users/mattw/Documents/production/mobile/mobileAcs/node_modules/react-native-filament/ios/libs/filament/include/math/compiler.h (in target 'react-native-filament' from project 'Pods')

⚠️  Script has ambiguous dependencies causing it to run on every build. To fix, go to: Xcode » ACSMobile/ACSMobile » Build Phases » '[CP-User] [RNFB] Core Configuration' Either: Uncheck "Based on dependency analysis", or select output files to trigger the script

› 1 error(s), and 2 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.

I have tried solutions that have been recommended on other stack overflow questions such as deleting certain files from the [CP] Copy Pods Resources, but nothing seems to be working. I have even tried manipulating the Podfile to either overwrite firebase packages to be static or filament to be dynamic but I cant seem to get anywhere.

ex:

use_frameworks!

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name.start_with?('Firebase')
        puts "overriding dynamic build type for firebase"
      def pod.build_type;
        Pod::BuildType.static_framework
      end
    end
  end
end

Any help would be appreciated!

Upvotes: 0

Views: 26

Answers (0)

Related Questions