【问题标题】:Expo EAS build error on ios - _iosPlugins(...).createInfoPlistPluginWithPropertyGuard is not a funcitonios 上的 Expo EAS 构建错误 - _iosPlugins(...).createInfoPlistPluginWithPropertyGuard 不是函数
【发布时间】:2023-02-08 19:53:27
【问题描述】:

我正在尝试为一个我在 4 个月内没有接触过的项目运行一个构建,所以最后一个构建应该是 2022 年 10 月。

运行构建时出现以下错误:

> eas build --profile local --platform ios
TypeError: (0 , _iosPlugins(...).createInfoPlistPluginWithPropertyGuard) is not a function

我从 Expo 45 -> 47 升级,但仍然出现相同的错误。

似乎与插件有关,但即使我从app.config.js 中删除插件块,我也会遇到同样的错误。

还尝试使用 withPlugins:

const { withPlugins } from '@expo/config-plugins'

const config = {
  name: 'xxx',
  ...,
}

export default withPlugins(config, [
  'sentry-expo',
  'expo-community-flipper',
])

返回以下错误:

Unexpected: Config `_internal.projectRoot` isn't defined by expo-cli, this is a bug.

关于如何让构建再次工作的任何想法?


部门:

"expo": "^47.0.13",
"sentry-expo": "~6.0.0",
"expo-community-flipper": "^47.0.2",
"react": "18.1.0",

应用程序.config.js:

module.exports = {
  name: 'xxx',
  owner: 'xxx',
  slug: 'xxx',
  version: '1.1.5',
  privacy: 'hidden',
  orientation: 'portrait',
  icon: 'xxx',
  scheme: 'xxx',
  runtimeVersion: 'exposdk:47.0.13',
  userInterfaceStyle: 'automatic',
  jsEngine: 'hermes',
  splash: {
    image: './assets/images/splash.png',
    resizeMode: 'cover',
    backgroundColor: '#ffffff',
  },
  updates: {
    fallbackToCacheTimeout: 0,
    url: `https://u.expo.dev/${expoProjectId}`,
    enabled: process.env.APP_VARIANT !== 'local',
  },
  assetBundlePatterns: ['**/*'],
  plugins: [
    'sentry-expo',
    'expo-community-flipper',
  ],
  ios: {
    supportsTablet: false,
    buildNumber: '1.1.5',
    bundleIdentifier: bundleIdentifierIos,
    config: {
      usesNonExemptEncryption: false,
    },
    infoPlist: {
      NSContactsUsageDescription: 'xxx',
      NSPhotoLibraryUsageDescription: 'xxx',
      NSCameraUsageDescription: 'xxx',
      NSLocationWhenInUseUsageDescription: 'xxx',
      UIBackgroundModes: ['remote-notification'],
    },
  },
  android: {
    package: bundleIdentifierAndroid,
    versionCode: 430000271,
    googleServicesFile,
  },
  extra: {
    APP_VARIANT: process.env.APP_VARIANT || null,
    ...env,
    eas: {
      projectId: expoProjectId,
    },
  },
  hooks: {
    postPublish: [{
      file: 'sentry-expo/upload-sourcemaps',
      config: {
        project: env ? env.SENTRY_PROJECT : null,
        organization: env ? env.SENTRY_ORG : null,
        authToken: env ? env.SENTRY_AUTH_TOKEN : null,
      }
    }],
  }
}

npx expo-env-info:

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 12.6.2
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
      Yarn: 1.22.17 - /usr/local/bin/yarn
      npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    IDEs:
      Android Studio: 2021.2 AI-212.5712.43.2112.8609683
      Xcode: 14.2/14C18 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^47.0.13 => 47.0.13
      react: 18.1.0 => 18.1.0
      react-dom: 18.1.0 => 18.1.0
      react-native: 0.70.5 => 0.70.5
      react-native-web: ~0.18.7 => 0.18.12
    Expo Workflow: managed

【问题讨论】:

    标签: ios react-native build expo eas


    【解决方案1】:

    需要运行npx eas-cli build --profile local --platform ios

    【讨论】:

      猜你喜欢
      • 2023-02-07
      • 2023-02-25
      • 2021-11-08
      • 2022-06-28
      • 2022-06-23
      • 2023-02-17
      • 2022-11-10
      • 2022-12-22
      • 2023-01-17
      相关资源
      最近更新 更多