一键导入
upgrading-expo
Guidelines for upgrading Expo SDK versions and fixing dependency issues
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guidelines for upgrading Expo SDK versions and fixing dependency issues
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling
Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (`useLoaderData`).
Remove AI-generated code slop from your codebase. Use when you want to clean up AI-introduced patterns like excessive comments, defensive checks, type casts, React anti-patterns, or other inconsistencies.
| name | upgrading-expo |
| description | Guidelines for upgrading Expo SDK versions and fixing dependency issues |
| version | 1.0.0 |
| license | MIT |
npx expo install expo@latest
npx expo install --fix
Run diagnostics: npx expo-doctor
Clear caches and reinstall
npx expo export -p ios --clear
rm -rf node_modules .expo
watchman watch-del-all
Beta versions use .preview suffix (e.g., 55.0.0-preview.2), published under @next tag.
Check if latest is beta: https://exp.host/--/api/v2/versions (look for -preview in expoVersion)
npx expo install expo@next --fix # install beta
NativeTabs.Trigger.*), migrate expo-av → expo-audio + expo-video@react-navigation/* imports to expo-router entry pointsFirst check if ios/ and android/ directories exist in the project. If neither directory exists, the project uses Continuous Native Generation (CNG) — skip prebuild entirely.
If upgrading requires native changes:
npx expo prebuild --clean
Only applies when ios/ and/or android/ directories exist:
cd ios && pod install --repo-updatenpx expo run:ios --no-build-cachecd android && ./gradlew cleanreact-native-worklets is installed (required for reanimated)"experiments": { "reactCompiler": true } in app.jsonsdkVersion from app.json — let Expo manage it automaticallypackage.json: @babel/core, babel-preset-expo, expo-constantsbabel.config.js only contains babel-preset-expo, delete the filemetro.config.js only contains expo defaults, delete the file| Old Package | Replacement |
|---|---|
expo-av | expo-audio and expo-video |
expo-permissions | Individual package permission APIs |
@expo/vector-icons | expo-symbols (for SF Symbols) |
AsyncStorage | expo-sqlite/localStorage/install |
expo-app-loading | expo-splash-screen |
expo-linear-gradient | experimental_backgroundImage + CSS gradients |
When migrating deprecated packages, update all code usage before removing the old package.
Check if package.json has excluded packages:
{
"expo": { "install": { "exclude": ["react-native-reanimated"] } }
}
Exclusions are often workarounds that may no longer be needed after upgrading. Review each one.
Check if there are outdated patches in the patches/ directory. Remove them if no longer needed.
autoprefixer isn't needed in SDK 53+. Remove it from dependencies and postcss.config.js/postcss.config.mjs.postcss.config.mjs in SDK 53+.Remove redundant metro config options:
resolver.unstable_enablePackageExports is enabled by default in SDK 53+experimentalImportSupport is enabled by default in SDK 54+EXPO_USE_FAST_RESOLVER=1 is removed in SDK 54+Since SDK 55, opt-in via useHermesV1: true in the expo-build-properties config plugin for improved runtime performance.
The new architecture is enabled by default. The "newArchEnabled": true field in app.json is no longer needed. Expo Go only supports the new architecture as of SDK 53+.