'folly/folly-config.h' file not found

时间:2019-06-01 14:05:48

标签: ios firebase react-native cocoapods folly

I'm having this problem when I want to run the application via xcode

Showing All Errors Only /Users/ugur/Documents/Projects/MyApp/node_modules/react-native/ReactCommon/cxxreact/JSBundleType.h:10:10: 'folly/Portability.h' file not found

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'MyApp' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for MyApp
  pod 'React', :path => '../node_modules/react-native'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  # Required by RNFirebase
  pod 'Firebase/Core', '~> 5.15.0'

  # [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
  pod 'Firebase/AdMob', '~> 5.15.0'
  pod 'Firebase/Auth', '~> 5.15.0'
  pod 'Firebase/Core', '~> 5.15.0'
  pod 'Firebase/Database', '~> 5.15.0'
  pod 'Firebase/Functions', '~> 5.15.0'
  pod 'Firebase/DynamicLinks', '~> 5.15.0'
  pod 'Firebase/Firestore', '~> 5.15.0'
  # pod 'Firebase/Invites', '~> 5.15.0'
  pod 'Firebase/Messaging', '~> 5.15.0'
  pod 'Firebase/RemoteConfig', '~> 5.15.0'
  pod 'Firebase/Storage', '~> 5.15.0'
  pod 'Firebase/Performance', '~> 5.15.0'
  pod 'Fabric', '~> 1.7.13'
  pod 'Crashlytics', '~> 3.10.9'
  pod 'RNIap', :path => '../node_modules/react-native-iap'

  pod 'Folly', :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec"


end

1 个答案:

答案 0 :(得分:0)

我解决了所有问题

private string GetFileOutputPath(string filePath, string fileName, string fileExtension, DateTime fileTime, string fileTimeFormat)
    {
        string outputFilePath = string.Empty;
        string fileTimeString = fileTime.ToString(fileTimeFormat);

        //Create initial output filepath, before we check for dups.
        if (filePath[filePath.Length - 1] != '\\')
            outputFilePath = String.Format(@"{0}\{1}_{2}", filePath, fileName, fileTimeString);
        else
            outputFilePath = String.Format(@"{0}{1}_{2}", filePath, fileName, fileTimeString);

        //In the case we already have the file in the directory.  
        if (File.Exists(String.Format("{0}.{1}", outputFilePath, fileExtension)))
        {
            //Iterate through the directory until we find a file name we can use .. using the microsoft convention of "filename(1).txt".
            int i;
            for (i = 1; File.Exists(String.Format("{0}({1}).{2}", outputFilePath, i, fileExtension)); ++i);

            outputFilePath = String.Format("{0}({1}).{2}", outputFilePath, i, fileExtension);
        }
        else
        {
            outputFilePath = String.Format("{0}.{1}", outputFilePath, fileExtension);
        }

        return outputFilePath;
    }

尝试过

rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* && watchman watch-del-all && npm cache clean --force && npm cache verify && rm -rf ios/build && rm -rf node_modules/ && npm i