Skip to content

CIのNodeバージョンを24へ統一しnpm ciのlock不整合を解消 - #6661

Merged
TinyKitten merged 2 commits into
devfrom
fix/unify-ci-node-24
Aug 12, 2026
Merged

TinyKitten merged 2 commits into
devfrom
fix/unify-ci-node-24

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

概要

Expo SDK 57 へのアップグレード (#6658) 以降、canary / production のネイティブビルドで npm ci が Missing: [email protected] from lock file により失敗していた問題を修正します。CI 上の Node メジャーバージョンを 24 に統一し、.nvmrc および他ワークフローと揃えます。

失敗例: Build iOS Canary #4609

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

  • ネイティブビルド系ワークフロー 4 本の node-version を "22" から "24" へ変更(build_ios_canary / build_ios_production / build_android_canary / build_android_production)
  • package.json の engines.npm を >=10 から >=11 へ更新し、実際に要求される npm と宣言を一致させた
  • AGENTS.md の「Tooling & Environment Expectations」を Node.js 24.x / npm 11.x に更新し、ワークフロー間で Node メジャーを揃えて維持する旨を追記
  • README.md / .github/copilot-instructions.md / docs/android-build-workflows.md / docs/ios-build-workflows.md / docs/bump-version-on-canary-pr.md の Node.js・npm 版数記述を 24.x / 11.x へ同期(CodeRabbit 指摘対応)

.npmrc に engine-strict=true が設定されているため、engines の宣言はインストール可否に直結します。README の前提条件が npm 10.x のままだと実際の制約と食い違うため、あわせて更新しました。なお docs/bump-version-on-canary-pr.md は対応する bump_version_on_canary_pr.yml が本 PR 以前から node-version: 24 であり、記述側が当初からワークフローと一致していなかったものを是正しています。

原因

Expo SDK 57 で typescript を ~6.0.3 へ引き上げたことが引き金です。@expo/image-utils 経由で入る @expo/[email protected] の peerDependency が typescript: "^5.0.0 || ^5.0.0-0" のままで TypeScript 6 に対応しておらず、この optional peer の扱いが npm のメジャーによって分かれていました。

環境 npm 挙動
ローカル / test.yml / typecheck.yml (Node 24) 11.x optional peer を解決対象とせず lock を生成するため成功
ビルド系ワークフロー (Node 22) 10.x peer を満たすため @expo/image-utils/node_modules/[email protected] を要求するが lock に存在せず EUSAGE

package-lock.json は Node 24 (npm 11) 環境で生成される一方、ビルド系ワークフローだけが Node 22 (npm 10) のまま取り残されていたことが原因でした。.nvmrc は既に 24 で、test.yml / typecheck.yml / bump_version_*.yml も 24 だったため、同一コミットでも Jest だけは成功していました。

検証

package.json と package-lock.json を作業ツリー外へ複製し、npm 10 / npm 11 の双方で npm ci --dry-run を実行して切り分けました。

修正前 npm 10: npm error Missing: [email protected] from lock file
修正後 npm 11: added 1320 packages   ← Node 24 化後の CI 相当

package-lock.json は変更していません。lock を npm 10 で再生成する案も検証しましたが、lightningcss の Linux バイナリが持つ libc フィールドが失われ、ローカルの npm install の度に差分が往復するため採用していません。

回帰リスクと緩和策

Node 24 化によりネイティブビルドの実行環境が変わります。ローカルでは iOS / Android の実ビルドまでは検証できないため、マージ後の canary ビルドで確認が必要です。JS 側は Node 24 で test.yml / typecheck.yml が既に安定稼働しており、リスクは限定的と判断しています。

テスト

コード本体(src/** ほか)に変更が無いため、テンプレのチェック欄は省略しています。ただし engines 変更の影響確認としてローカルで一通り実行し、いずれも通過することを確認済みです。

npm run lint       Checked 631 files. No fixes applied.
npm test           218 suites / 2304 tests 全て passed
npm run typecheck  エラーなし

加えて、変更した 4 ファイルの YAML パース検証と、リポジトリ内の node-version 指定 8 箇所がすべて 24 に揃っていることを確認しました。

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

関連Issue

スクリーンショット(任意)

Summary by CodeRabbit

  • 変更
    • AndroidおよびiOSのビルド環境で使用するNode.jsを24系に更新しました。
    • npmの必要バージョンを11以上に更新し、開発環境と自動ビルド環境のバージョン要件を統一しました。

@TinyKitten TinyKitten self-assigned this Aug 12, 2026
@github-actions github-actions Bot added the ci/cd label Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 977452d7-b93f-41b0-ae93-ec975a629ae1

📥 Commits

Reviewing files that changed from the base of the PR and between b13d111 and 39dc445.

📒 Files selected for processing (5)
  • .github/copilot-instructions.md
  • README.md
  • docs/android-build-workflows.md
  • docs/bump-version-on-canary-pr.md
  • docs/ios-build-workflows.md

📝 Walkthrough

Walkthrough

Node.js を 22 から 24 に、npm の要件を 10 から 11 に更新しました。CI、開発環境、プロジェクト要件、ビルド関連ドキュメントの記載を同期しました。

Changes

実行環境の更新

Layer / File(s) Summary
Node.js と npm の要件更新
package.json, AGENTS.md, .github/copilot-instructions.md, README.md
package.json の npm 要件を >=11 に更新しました。開発環境の Node.js と npm の指定を 24.x / 11.x に更新しました。
モバイル CI の Node.js 更新
.github/workflows/build_android_*.yml, .github/workflows/build_ios_*.yml
Android と iOS の Canary / Production ワークフローで、actions/setup-node の Node.js を 24 に更新しました。
ビルド要件ドキュメントの更新
docs/android-build-workflows.md, docs/ios-build-workflows.md, docs/bump-version-on-canary-pr.md
ビルドワークフローと Canary PR の手順に記載された Node.js 要件を 24 に更新しました。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Poem

うさぎは Node.js 24へ跳ねる
npm 11の道を進む
AndroidとiOSもそろう
CanaryとProductionも動く
CIの時計が刻む、ぴょん!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed CIのNode.js 24統一とnpm ciのlock不整合解消という主要変更を明確に示しています。
Description check ✅ Passed 概要、変更内容、原因、検証、リスク、関連Issue、スクリーンショットの各項目を記載し、テスト結果も具体的に示しています。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/unify-ci-node-24

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 126: Update the Node.js/npm version references in README.md,
.github/copilot-instructions.md, docs/android-build-workflows.md, and
docs/ios-build-workflows.md to Node.js 24.x and npm 11.x, keeping the
installation and native-build instructions consistent with the package.json
requirement.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 47e33dd6-801f-4777-bd60-5ca071c46345

📥 Commits

Reviewing files that changed from the base of the PR and between 915c70f and b13d111.

📒 Files selected for processing (6)
  • .github/workflows/build_android_canary.yml
  • .github/workflows/build_android_production.yml
  • .github/workflows/build_ios_canary.yml
  • .github/workflows/build_ios_production.yml
  • AGENTS.md
  • package.json

Comment thread package.json Resolved
@TinyKitten

Copy link
Copy Markdown
Member Author

Fixes Applied Successfully

Fixed 5 file(s) based on 1 CodeRabbit feedback item(s).

Files modified:

  • README.md
  • .github/copilot-instructions.md
  • docs/android-build-workflows.md
  • docs/ios-build-workflows.md
  • docs/bump-version-on-canary-pr.md

Commit: 39dc44530

Node.js / npm の版数記述を 24.x / 11.x へ揃えました。ご指摘の 4 ファイルに加え、docs/bump-version-on-canary-pr.md にも Node.js 22 の記述が残っていたため同時に是正しています(対応する bump_version_on_canary_pr.yml は本 PR 以前から node-version: 24 でした)。

The latest autofix changes are on the fix/unify-ci-node-24 branch.

@TinyKitten

Copy link
Copy Markdown
Member Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved and changes approved.

@TinyKitten
TinyKitten merged commit fd007e5 into dev Aug 12, 2026
3 checks passed
@TinyKitten
TinyKitten deleted the fix/unify-ci-node-24 branch August 12, 2026 09:02
This was referenced Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant