首页 > 解决方案 > 仅构建 Expo Bare Workflow React Native App ios 版本时出错

问题描述

嗨堆栈溢出社区,

启动 eas build 时出现构建错误(react native app expo Bare Workflow)

环境:

 Expo CLI 4.7.3 environment info:
    System:
      OS: macOS 10.15.6
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.14.0 - /usr/local/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 6.13.4 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.8.4 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    IDEs:
      Android Studio: 4.2 AI-202.7660.26.42.7351085
      Xcode: 12.4/12D4e - /usr/bin/xcodebuild
    npmPackages:
      expo: ^41.0.0 => 41.0.1 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: ~0.63.4 => 0.63.4 
      react-native-web: ~0.13.12 => 0.13.18 
      react-navigation: ^4.4.4 => 4.4.4 
    npmGlobalPackages:
      expo-cli: 4.7.3
    Expo Workflow: bare

套餐:

  "dependencies": {
    "@expo/vector-icons": "^12.0.0",
    "@react-native-async-storage/async-storage": "^1.13.0",
    "@react-native-community/cli-platform-ios": "^5.0.1-alpha.2",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-picker/picker": "^1.16.1",
    "@react-navigation/bottom-tabs": "5.11.2",
    "@react-navigation/native": "^5.9.4",
    "@react-navigation/stack": "~5.12.8",
    "@reduxjs/toolkit": "^1.5.1",
    "@sentry/react-native": "^2.4.3",
    "@stripe/stripe-react-native": "^0.1.2",
    "@types/react-native-snap-carousel": "^3.8.3",
    "email-validator": "^2.0.4",
    "expo": "^41.0.0",
    "expo-asset": "~8.3.1",
    "expo-constants": "~10.1.3",
    "expo-font": "^9.1.0",
    "expo-linking": "^2.2.3",
    "expo-location": "^12.0.4",
    "expo-notifications": "^0.11.6",
    "expo-permissions": "^12.0.1",
    "expo-secure-store": "^10.1.0",
    "expo-splash-screen": "~0.10.2",
    "expo-status-bar": "^1.0.4",
    "expo-updates": "~0.5.4",
    "expo-web-browser": "~9.1.0",
    "moment-timezone": "^0.5.33",
    "parse": "^3.1.0",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "~0.63.4",
    "react-native-animatable": "^1.3.3",
    "react-native-appearance": "~0.3.3",
    "react-native-dropdown-picker": "^5.1.21",
    "react-native-elements": "^3.3.2",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-modal": "^11.10.0",
    "react-native-numeric-input": "^1.9.0",
    "react-native-pager-view": "5.0.12",
    "react-native-paper": "^4.8.1",
    "react-native-reanimated": "^2.1.0",
    "react-native-render-html": "^5.1.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "^3.3.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-stripe-checkout-webview": "0.0.13",
    "react-native-tab-view": "^3.0.1",
    "react-native-ui-lib": "^5.22.0",
    "react-native-vector-icons": "^8.1.0",
    "react-native-web": "~0.13.12",
    "react-native-webview": "^11.2.3",
    "react-navigation": "^4.4.4",
    "react-redux": "^7.2.3",
    "react-ridge-state": "^4.2.1",
    "redux": "^4.0.5",
    "sentry-expo": "^3.1.0",
    "react-native-unimodules": "~0.13.3"
  },
  "devDependencies": {
    "@babel/core": "^7.9.6",
    "@types/lodash": "^4.14.168",
    "@types/react": "~16.9.35",
    "@types/react-native": "~0.63.2",
    "@types/react-redux": "^7.1.16",
    "jest-expo": "^41.0.0",
    "redux-tools": "^3.2.0",
    "typescript": "~4.0.0"
  }

播客文件

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

 
target 'TableDiscover' do

  use_unimodules!
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  # Uncomment to opt-in to using Flipper
  #
  # if !ENV['CI']
  #   use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
  #   post_install do |installer|
  #     flipper_post_install(installer)
  #   end
  # end

  
end

预期行为 EAS 无错误构建

未找到实际行为“folly/dynamic.h”文件

我尝试过: rm podfile.lock 并进行 pod 安装。删除 /ios 目录并运行 expo 弹出以获取新的 /ios。

但它没有用。

有人有任何线索吗?

非常感谢你的帮助

标签: react-native

解决方案


推荐阅读