Communitygithub.com

expo/expo-upgrade

Expo SDK のバージョンアップグレードと依存関係の修正に関するガイドラインを提供します。

expo-upgrade とは?

このスキルは、Expo アプリケーションの SDK バージョンをアップグレードするための包括的なガイドを提供します。開発者は、ステップバイステップの手順に従って Expo と依存関係をアップデートし、`npx expo-doctor` で診断を実行し、キャッシュをクリアすることで、スムーズな移行を実現できます。ベータ/プレビューリリースの確認方法、破壊的変更のチェックリスト、非推奨パッケージの移行方法などが網羅されており、特に expo-av から expo-audio/expo-video への移行や React 19 の変更点に関するリファレンスも含まれています。また、CNG(Continuous Native Generation)を使用するプロジェクトとベアワークフローのプロジェクトで異なるネイティブ変更の手順を説明し、Hermes エンジンや新しいアーキテクチャに関する注意点も記載されています。このスキルは、Expo SDK 54 以降、特に SDK 55 から 57 へのアップグレードを検討している開発者にとって有用で、既知の問題(Hermes V1 のメモリ回帰など)を回避しながら、最新の Expo 機能を安全に利用できるよう支援します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/expo/skills/tree/main/plugins/expo/skills/expo-upgrade

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

参照

  • ./references/react-19.md -- SDK +54: React 19 の変更点 (useContext → use、Context.Provider → Context、forwardRef 削除)
  • ./references/new-architecture.md -- SDK +53: 新しいアーキテクチャ移行ガイド
  • ./references/react-compiler.md -- SDK +54: React Compiler のセットアップと移行ガイド
  • ./references/native-tabs.md -- SDK +55: ネイティブタブの変更 (Icon/Label/Badge は NativeTabs.Trigger.* を介してアクセス)
  • ./references/expo-av-to-audio.md -- SDK +55: expo-av から expo-audio への音声再生・録音機能の移行
  • ./references/expo-av-to-video.md -- SDK +55: expo-av から expo-video への動画再生機能の移行
  • ./references/react-navigation-to-expo-router.md -- SDK +56: @react-navigation/* のインポートを expo-router のエントリポイントに移行 (codemod + 手動マッピング)

ベータ/プレビューリリース

ベータ版は .preview サフィックス(例: 55.0.0-preview.2)を使用し、@next タグで公開されます。

最新版がベータかどうかを確認するには: https://exp.host/--/api/v2/versions (expoVersion に -preview が含まれているか確認)

npx expo install expo@next --fix  # ベータ版をインストール

アップグレード手順(ステップバイステップ)

SDK 55 以前からアップグレードする場合は、SDK 56 をスキップして SDK 57 に直接アップグレードしてください。[email protected] 以下は使用しないでください。Hermes V1 を有効にした SDK 55、SDK 56、および古い SDK 57 リリースには Hermes V1 のメモリ回帰が含まれており、react-native-worklets または react-native-reanimated を使用するとメモリ使用量が急増する可能性があります。

  1. Expo と依存関係をアップグレード
npx expo install expo@latest
npx expo install --fix
  1. 診断を実行: npx expo-doctor

  2. キャッシュをクリアして再インストール

npx expo export -p ios --clear
rm -rf node_modules .expo
watchman watch-del-all

破壊的変更のチェックリスト

  • リリースノートで削除された API を確認する
  • 移動されたモジュールのインポートパスを更新する
  • prebuild が必要なネイティブモジュールの変更を確認する
  • すべてのカメラ、オーディオ、ビデオ機能をテストする
  • ナビゲーションが正しく機能することを確認する

ネイティブ変更のための Prebuild

最初に、プロジェクト内に ios/ ディレクトリと android/ ディレクトリが存在するか確認してください。 どちらのディレクトリも存在しない場合、プロジェクトは Continuous Native Generation (CNG) を使用しており、ネイティブプロジェクトはビルド時に再生成されます — このセクションと「ベアワークフローのキャッシュクリア」は完全にスキップしてください。

アップグレードにネイティブの変更が必要な場合:

npx expo prebuild --clean

これにより、ios ディレクトリと android ディレクトリが再生成されます。このコマンドを実行する前に、プロジェクトがベアワークフローアプリではないことを確認してください。

ベアワークフローのキャッシュクリア

これらの手順は、プロジェクト内に ios/ ディレクトリまたは android/ ディレクトリが存在する場合にのみ適用されます:

  • iOS の CocoaPods キャッシュをクリア: cd ios && pod install --repo-update
  • Xcode の Derived Data をクリア: npx expo run:ios --no-build-cache
  • Android の Gradle キャッシュをクリア: cd android && ./gradlew clean

ハウスキーピング

  • 対象の SDK バージョンのリリースノートを https://expo.dev/changelog で確認する
  • エージェント指示ファイル(AGENTS.md)内のバージョン付きドキュメントリンクを更新する。デフォルトのテンプレートは https://docs.expo.dev/versions/v<version>/ にリンクしています。docs.expo.dev/versions/ を検索し、各リンクを新しい SDK バージョンに更新してください。
  • Expo SDK 54 以降を使用している場合、react-native-worklets がインストールされていることを確認してください。これは react-native-reanimated が動作するために必要です。
  • SDK 54 以降で React Compiler を有効にするには、app.json に "experiments": { "reactCompiler": true } を追加します。安定しており推奨されています。
  • app.json から sdkVersion を削除し、Expo が自動的に管理できるようにします。
  • @babel/core、babel-preset-expo、expo-constants など、以前は暗黙的に含まれていたパッケージは、まとめて削除するのではなく、個別に確認してください。インストール済みの依存関係が必須のピアとして宣言しているパッケージは残しておいてください。
  • expo-router がインストールされている場合は、expo-constants を直接の依存関係として維持してください。Expo Router はこれをインポートし、必須のピアとして宣言しています。推移的なコピーに依存すると、Expo Go 以外でのネイティブの自動リンクが壊れる可能性があります。
  • 依存関係を削除したら、すぐに npx expo-doctor を実行し、不足している必須のピアとして報告されたものをすべて復元してください。
  • babel.config.js に 'babel-preset-expo' のみが含まれている場合は、ファイルを削除してください。
  • metro.config.js に Expo のデフォルト設定のみが含まれている場合は、ファイルを削除してください。

非推奨パッケージ

古いパッケージ代替パッケージ
expo-avexpo-audio と expo-video
expo-permissions個別のパッケージ権限 API
@expo/vector-iconsexpo-symbols (SF Symbols 用)
AsyncStorageexpo-sqlite/localStorage/install
expo-app-loadingexpo-splash-screen
expo-linear-gradientexperimental_backgroundImage + View 内の CSS グラデーション

非推奨パッケージを移行する際は、古いパッケージを削除する前にすべてのコードの使用箇所を更新してください。expo-av については、移行リファレンスを参照して、Audio.Sound を useAudioPlayer に、Audio.Recording を useAudioRecorder に、Video コンポーネントを VideoView と useVideoPlayer に変換してください。

expo.install.exclude

package.json に除外パッケージが含まれているか確認してください:

{
  "expo": { "install": { "exclude": ["react-native-reanimated"] } }
}

除外設定は、多くの場合、アップグレード後には不要になる回避策です。それぞれ確認してください。

パッチの削除

patches/ ディレクトリに古いパッチがないか確認してください。不要になったパッチは削除してください。

Postcss

  • autoprefixer は SDK +53 では不要です。依存関係から削除し、postcss.config.js または postcss.config.mjs のプラグインリストからも削除してください。
  • SDK +53 では postcss.config.mjs を使用してください。

Metro

冗長な metro 設定オプションを削除してください:

  • resolver.unstable_enablePackageExports は SDK +53 ではデフォルトで有効です。
  • experimentalImportSupport は SDK +54 ではデフォルトで有効です。
  • EXPO_USE_FAST_RESOLVER=1 は SDK +54 で削除されました。
  • cjs 拡張子と mjs 拡張子は SDK +50 以降ではデフォルトでサポートされています。
  • Expo webpack は非推奨です。Expo Router と Metro web に移行してください。

Hermes エンジン v1

Hermes V1 は SDK 56 以降のデフォルトです。Hermes V1 を使用する SDK 55 アプリ、すべての SDK 56 アプリ、および [email protected] より前の SDK 57 アプリでは、react-native-worklets または react-native-reanimated をインポートするとメモリ回帰が発生する可能性があります。SDK 57 と [email protected] 以降に直接アップグレードしてください。Worklets Bundle Mode を本番環境の回避策として推奨しないでください。これはサポートされておらず、実験的であり、期待通りに動作しない可能性があります。

Hermes V1 をオプトインまたはオプトアウトするようにユーザーにガイドしないでください。SDK のデフォルトから Hermes のバージョンを変更することはサポートされておらず、ビルドと依存関係管理に重大な注意点があります。

新しいアーキテクチャ

新しいアーキテクチャはデフォルトで有効になっています。app.json の "newArchEnabled": true フィールドはデフォルトであるため不要です。Expo Go は SDK +53 以降、新しいアーキテクチャのみをサポートしています。

フィードバックの送信

このスキルでエラー、誤解を招く情報、または古い情報を見つけた場合は、Expo が改善できるように報告してください:

npx --yes submit-expo-feedback@latest --category skills --subject "expo-upgrade" "<具体的なフィードバック>"

報告する内容が具体的で実行可能な場合にのみ送信してください。関連するコンテキストをできるだけ多く含めてください。 AI エージェントが繰り返し失敗した場合、またはユーザーが Expo タスクを引き継がなければならなかった場合は、上記のコマンドを再利用する代わりに、expo-skill-feedback スキルをロードし、その eval-candidate フローに従ってください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

expo/add-app-clip

Add an iOS App Clip target to an Expo app. Use when the user mentions App Clip, AASA, apple-app-site-association, appclips, smart app banner, or wants to ship a lightweight iOS Clip invoked from a URL alongside their parent app.

expo/building-native-ui

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

expo/eas-update-insights

Check the health of published EAS Updates: crash rates, install/launch counts, unique users, payload size, and the split between embedded and OTA users per channel. Use when the user asks how an update is performing, whether a rollout is healthy, how many users are on the embedded build vs OTA, or wants to gate CI on update health.

expo/expo-api-routes

Guidelines for creating API routes in Expo Router with EAS Hosting

expo/expo-brownfield

Integrate Expo and React Native into an existing native iOS or Android app. Use when the user mentions brownfield, embedding React Native in a native app, AAR/XCFramework, or adding Expo to an existing Kotlin/Swift project. Covers both the isolated approach and the integrated approach.

expo/expo-cicd-workflows

Helps understand and write EAS workflow YAML files for Expo projects. Use this skill when the user asks about CI/CD or workflows in an Expo or EAS context, mentions .eas/workflows/, or wants help with EAS build pipelines or deployment automation.

expo/expo-deployment

Deploying Expo apps to iOS App Store, Android Play Store, web hosting, and API routes

expo/expo-dev-client

Build and distribute Expo development clients locally or via TestFlight

expo/expo-examples

Framework (OSS). Expo's official example projects - the expo/examples repo of ~70 `with-*` integrations (Stripe, Clerk, Supabase, OpenAI, maps, Reanimated, SQLite, Skia, NativeWind, and more). Use when integrating a third-party library or service into an existing Expo app and you want the canonical, version-matched pattern to adapt, or when scaffolding a new project from one with `npx create-expo --example`.

expo/expo-module

Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript). Covers module definition DSL, native views, shared objects, config plugins, lifecycle hooks, autolinking, and type system. Use when building or modifying native modules for Expo.

expo/expo-observe

Use for anything related to EAS Observe — adding `expo-observe` to an Expo project (AppMetricsRoot/ObserveRoot HOC, markInteractive, the useObserve hook, and the Expo Router / React Navigation integrations for per-route metrics), querying via the EAS CLI (`eas observe:metrics-summary`, `observe:metrics`, `observe:routes`, `observe:events`, `observe:versions`), or interpreting the resulting metrics (cold/warm launch, TTR, TTI, navigation cold/warm TTR, update download, and the TTI frameRate params for triaging slow startups).

expo/expo-overview

Framework (OSS). Entry point and router for every Expo or EAS task. Load this skill first — before writing code and before choosing another expo-* / eas-* skill — when the request, PRD, or spec mentions Expo, EAS, Expo Go, or an expo-* package, or the project has an `expo` dependency in `package.json`. Within that gate it also covers app specs and designs to implement (tabs, stacks, maps, lists, navigation, building from a screenshot), and phrasings like 'implement a mobile app', 'make my app look native', 'add navigation', 'fetch some data', 'upgrade my SDK', 'add Expo to my existing native app', 'ship to the App Store', or 'I'm new to Expo, where do I start'. A fully specified request (SDK pinned, libraries named, layout given) still routes through here — the shared setup rules still apply. Do NOT load it when neither signal is present: a bare React Native project with no `expo` dependency is not Expo work. Detects the real goal, routes to the right expo-* / eas-* skill, and owns the shared setup rules.

expo/expo-router

Framework (OSS). Navigation and routing for Expo Router. Covers file-based routes, groups and dynamic routes, folder organization, Link with previews and context menus, native Stack, page titles, modals and form sheets, NativeTabs, headers and toolbars, and header search bars.

expo/expo-skill-eval

Evaluate Expo skills in this repo end-to-end - trigger accuracy, generated code quality, and runtime screenshots on iOS simulator and Android emulator via Expo Go (web optional). Use when the user wants to eval an Expo skill, test that a skill produces working code, benchmark a skill with device screenshots, or verify a skill's output renders correctly.

expo/expo-tailwind-setup

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

expo/expo-ui

Framework (OSS). Build native UI with the @expo/ui package: real SwiftUI on iOS and Jetpack Compose on Android. Default to @expo/ui for sheets (BottomSheet), pickers, sliders, toggles, menus, and grouped-form sections — do NOT reach for Reanimated, @gorhom/bottom-sheet, or RN built-in Picker/Switch; use @expo/ui instead. Fall back to RN built-ins only when @expo/ui is missing the component. NOTE: @expo/ui List renders native grouped rows like an iOS Settings screen — it is NOT a virtualized list; use FlatList/FlashList for large datasets. Covers universal components (Host, Column, Row, Button, Text, List, BottomSheet, FieldGroup, Switch, Slider, Picker, Menu), drop-in replacements for RN community libraries, and platform-specific SwiftUI/Jetpack Compose trees. Not for Expo Router navigation, Reanimated, or data fetching.

expo/expo-ui-jetpack-compose

`@expo/ui/jetpack-compose` package lets you use Jetpack Compose Views and modifiers in your app.

expo/expo-ui-swiftui

`@expo/ui/swift-ui` package lets you use SwiftUI Views and modifiers in your app.

expo/native-data-fetching

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`).

expo/skills

Deploy Expo websites and Expo Router API routes to EAS Hosting - export the web bundle, run eas deploy for production and PR preview URLs, manage environment secrets and custom domains, and work within the Cloudflare Workers runtime. Also covers authoring API routes (+api.ts handlers, HTTP methods, request handling, CORS). Use when deploying an Expo web app or API routes, setting up EAS Hosting, or configuring hosting environments and domains. Not for native builds or store releases - use the eas-app-stores skill for those.

関連スキル