CollectUICollectUI

Native EAS Deployment

Build the Android installation package for HeroUI Native Pro using EAS Build

This article was written by a human (md) and optimized by AI (mdx).

This guide is based on the completed HeroUI Native Pro installation. Please complete the basic installation and configuration first.

Configure the preinstall Script

Switch to apps/native/ and add a preinstall script to package.json:

Add the preinstall Script

apps/native/package.json
{
  "scripts": {
    "preinstall": "npx -y hpsetup@latest <your_hp_key>"
  }
}

This step ensures that hpsetup runs before dependencies are installed, completing the full installation of all dependencies in advance, and then removes the postinstall of the pro package (so that subsequent installs pass without dependency build errors).

If you want to experience the latest internal testing implementation, you can replace latest with beta.

Configure EAS

Add an eas.json file:

apps/native/eas.json
{
  "cli": {
    "version": ">= 18.13.0",
    "appVersionSource": "remote"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal"
    },
    "production": {
      "autoIncrement": true
    }
  },
  "submit": {
    "production": {}
  }
}

Add a .nvmrc file to specify Node version 22 (required by pnpm 11, otherwise an error will occur):

apps/native/.nvmrc
22

Run the Build

npx -y --package eas-cli eas build -p android -e preview

Temporarily install an eas-cli package, then run the eas command within it, using the preview profile to run the Android build.

Successful build:

EAS build successful

After installing the APK and running it:

APK installed and running

Tips

ERR_PNPM_IGNORED_BUILDS

If you encounter the ERR_PNPM_IGNORED_BUILDS issue, you need to add the corresponding dependencies to the trust list (allowing their build scripts to execute):

ERR_PNPM_IGNORED_BUILDS error

This is just an example; this dependency is already included in the hpsetup trust list.

Official Expo Plugin

If you need assistance with Expo development, you can install the official plugin:

Official Expo plugin

How is this guide?

Last updated on

On this page