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.
支持工作区的包管理器可能需要特殊设置
🌐 Package managers with workspaces support may require special setup
注意:针对 Bun、npm、pnpm 和 Yarn 以外的包管理器的官方指导有限。
EAS Build 支持使用支持工作区的包管理器管理的单体仓库。然而,第三方的单体仓库或工作区工具可能无法按预期工作,或需要额外的设置。设置和配置单体仓库与工作区时,复杂性通常会增加。在创建单体仓库之前,请检查你的工具和库在单体仓库中是否能良好运行。请参阅 使用单体仓库。
🌐 EAS Build supports monorepos managed with package managers supporting workspaces. However, third-party monorepo or workspaces tooling may not work as expected or require additional setup. Increased complexity is common when setting up and configuring monorepos and workspaces. Check whether your tools and libraries work well within a monorepo before setting one up. See Work with monorepos.
收到有关更改的通知
🌐 Get notified about changes
为了在这些事项取得进展时收到通知,你可以订阅 EAS 新闻通讯:expo.dev/eas。
🌐 To be notified as progress is made on these items, you can subscribe to the EAS newsletter on expo.dev/eas.