Expo: scaffold a new app
No sign-in until step 6. source /home/box/expo-builder/env.sh. File formats: expo-builder-reference §3–§4.
- Create (SDK 58):
pnpm dlx create-expo-app@latest <name> --template default@sdk-58 --yes --no-install && cd <name>--template default@sdk-57(expo ≥57.0.9) if the owner asks, a library lacks RN 0.88 support, or a beta blocker appears. Tell the owner if SDK 58 is still a beta (latest< 58). - pnpm files before the first install:
"packageManager": "pnpm@11.27.0";pnpm-workspace.yamlwithoverrides.react-native= the template'sdependencies["react-native"]only while it's an RC/beta (comment "remove at SDK 58 stable"), plusallowBuilds: { unrs-resolver: true }.node -e 'const f="package.json",p=require("./"+f);p.packageManager="pnpm@11.27.0";require("fs").writeFileSync(f,JSON.stringify(p,null,2)+"\n")' - Install and check:
Report other unmet peers; never silence them withpnpm install node -p 'require("./node_modules/expo/bundledNativeModules.json")["react-native"]' # must equal the override pnpm why react-native # exactly one version pnpm peers check # known SDK 58 beta noise: worklets range on expo-modules-core, @react-native/metro-config 0.87.1peerDependencyRules. - Structure and config:
- Read
expo-project-structureviaexpo-skills-library(new projects only). - Set
ios.bundleIdentifierandandroid.package; keep a staticapp.json(dev and prod side by side:APP_VARIANTinapp.config.tsspreading...config). Managed workflow: no committedios//android/. ios.infoPlist.ITSAppUsesNonExemptEncryption: false(reference §3; ask if custom non-exempt encryption).- Keep the generated
AGENTS.md(itsnpx expo …runs aspnpm expo …). Preferexpo-symbolsor@react-native-vector-icons/*over@expo/vector-icons.
- Read
- eas.json and a green baseline:
- eas.json from reference §4 (SDK 57:
sdk-57images), with both dev profiles (developmentfor devices,development-simulator) up front. - Create
expo-env.d.tswith/// <reference types="expo/types" />. - Fix SDK 58 template issues: Strict TS
referror insrc/components/app-tabs.web.tsx;react-hooks/set-state-in-effectlint insrc/hooks/use-color-scheme.web.ts. pnpm expo lintonce (adds eslint and eslint-config-expo), thenCI=1 pnpm install --frozen-lockfile(the EAS install step; fails ifallowBuildsmisses a package).- Add
.env*(except.env.example) and.env.eas-simulatorto.gitignore. Commitpnpm-lock.yamlandpnpm-workspace.yaml.
- eas.json from reference §4 (SDK 57:
- EAS link (ask first):
eas init --non-interactive, the first EAS step: runexpo-request-sign-infirst, both asks in one message. Theneas update:configure(don't hand-writeupdates.urlorruntimeVersion; before an Expo Launch build switch its policy to a static string, seeexpo-launch-app). - Finish:
expo-verify-change, commit, report with the evidence contract. Repo creation or pushing follows the PR policy.