EAS 构建限制

了解 EAS Build 当前的限制。


EAS Build 旨在适用于任何 React Native 项目。但是,最好了解我们计划解决的某些限制,因为它们可能会阻止你在应用中使用该服务或可能造成不便。

¥EAS Build is designed to work for any React Native project. However, it is good to be aware of certain limitations that we plan to address since they could prevent you from being able to use the service for your applications or might cause an inconvenience.

修复了构建工作服务器上的内存和 CPU 限制

¥Fixed memory and CPU limits on build worker servers

如果你的构建过程需要大量内存,则可用资源可能不足以构建你的应用。在这种情况下,请考虑在 eas.json 中使用 large 资源类。参见 Android 特定的资源类iOS 特定的资源类

¥The resources available might be insufficient to build your app if your build process requires a significant amount of memory. In this case, consider using a large resource class in the eas.json. See Android-specific resource class and iOS-specific resource class.

请参阅 服务器基础架构参考 了解更多信息。它包含有关 Android (Ubuntu) 和 iOS (macOS) 构建服务器当前规范的最新信息。

¥See Server infrastructure reference for more information. It contains the most up-to-date information about the current specifications of the Android (Ubuntu) and iOS (macOS) build servers.

有限的依赖缓存

¥Limited dependency caching

Android 的构建作业从本地缓存安装 npm 和 Maven 依赖。iOS 的构建作业从本地缓存安装 npm 依赖,从缓存服务器安装 CocoaPods 工件。

¥Build jobs for Android install npm and Maven dependencies from a local cache. Build jobs for iOS install npm dependencies from a local cache, and CocoaPods artifacts from a cache server.

中间工件(如 node_modules 目录)不会被缓存和恢复(例如,基于 package-lock.json 或 yarn.lock),但如果你将它们提交到 Git 存储库,则它们将被上传到构建服务器。

¥Intermediate artifacts like node_modules directories are not cached and restored (for example, based on package-lock.json or yarn.lock), but if you commit them to your Git repository then they will be uploaded to build servers.

请参阅 依赖缓存 了解更多信息。

¥See dependency caching for more information.

最长构建持续时间为 2 小时

¥Maximum build duration of 2 hours

如果你的构建运行时间超过 2 小时,它将被取消。免费计划的此限制较低,并且该限制将来可能会发生变化。

¥If your build takes longer than 2 hours to run, it will be canceled. This limit is lower on the free plan, and the limit is subject to change in the future.

每个平台每个账户的最大待构建数量为 50 个

¥Maximum number of pending builds is 50 per platform per account

如果你有超过 50 个平台待处理的构建,新的构建将被拒绝,直到待处理的构建数量低于限制。

¥If you have more than 50 builds pending for a platform, new builds will be rejected until the number of pending builds drops below the limit.

建议使用 Yarn 工作区进行 monorepos

¥Yarn workspaces is recommended for monorepos

注意:除了 Yarn 之外,其他包管理器的官方指导是有限的。

¥Note: Official guidance for package managers other than Yarn is limited.

虽然如果你愿意深入研究并了解工具并亲自动手,那么你可能可以使用 Nx 等其他 monorepo 工具取得成功,但 Expo 团队将无法提供有关这些工具的支持和指导。我们建议使用 Yarn 工作区,因为它是我们目前唯一提供一流集成的 monorepo 工具。

¥While you likely can have success using other monorepo tools like Nx if you are willing to dig in and understand the tooling and get your hands dirty, the Expo team will be unable to provide support and guidance on those tools. We recommend using Yarn Workspaces because it is the only monorepo tool that we provide first-class integration with at the moment.

收到有关更改的通知

¥Get notified about changes

要在这些项目取得进展时收到通知,你可以订阅 expo.dev/eas 的 EAS 新闻通讯。

¥To be notified as progress is made on these items, you can subscribe to the EAS newsletter on expo.dev/eas.