[PR #194] [MERGED] fix: add React version check to vinext build (#185) #379

Closed
opened 2026-05-06 12:39:30 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/194
Author: @StringerBell69
Created: 2/28/2026
Status: Merged
Merged: 2/28/2026
Merged by: @southpolesteve

Base: mainHead: fix/build-react-version-check


📝 Commits (1)

  • ffb6f44 fix: add React version check to vinext build

📊 Changes

1 file changed (+15 additions, -1 deletions)

View changed files

📝 packages/vinext/src/cli.ts (+15 -1)

📄 Description

#185 — Add React version check to vinext build for App Router compatibility

Summary

  • Mirror the getReactUpgradeDeps() check from vinext deploy into buildApp(), ensuring React is upgraded to ≥19.2.4 before any App Router build
  • Closes the silent failure path where users running vinext build + wrangler deploy manually would hit a cryptic moduleMap crash at runtime with react@19.2.0

Details

Root cause
vinext deploy already guarded against react-server-dom-webpack compatibility issues via getReactUpgradeDeps(), but vinext build had no equivalent check. Users who bypassed vinext deploy and ran the build + deploy steps manually fell through this gap with no warning.

Failing behavior (before)

TypeError: Cannot read properties of undefined (reading 'moduleMap')

Triggered at runtime on deployed Workers when react@19.2.0 was present — no build-time warning, no actionable error.

Changes

  • buildApp() — added getReactUpgradeDeps() call before the App Router build step; React <19.2.4 is now automatically upgraded at build time, matching the behaviour already present in vinext deploy

What's not changed

  • No changes to vinext deploy logic — the existing check there is unchanged
  • No new dependencies introduced

Closes
moduleMap runtime error on deployed Workers (react@19.2.0)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/194 **Author:** [@StringerBell69](https://github.com/StringerBell69) **Created:** 2/28/2026 **Status:** ✅ Merged **Merged:** 2/28/2026 **Merged by:** [@southpolesteve](https://github.com/southpolesteve) **Base:** `main` ← **Head:** `fix/build-react-version-check` --- ### 📝 Commits (1) - [`ffb6f44`](https://github.com/cloudflare/vinext/commit/ffb6f44d153f54eba7e131eef210dbeb375793b2) fix: add React version check to vinext build ### 📊 Changes **1 file changed** (+15 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/cli.ts` (+15 -1) </details> ### 📄 Description **#185 — Add React version check to `vinext build` for App Router compatibility** **Summary** - Mirror the `getReactUpgradeDeps()` check from `vinext deploy` into `buildApp()`, ensuring React is upgraded to `≥19.2.4` before any App Router build - Closes the silent failure path where users running `vinext build` + `wrangler deploy` manually would hit a cryptic `moduleMap` crash at runtime with `react@19.2.0` **Details** **Root cause** `vinext deploy` already guarded against `react-server-dom-webpack` compatibility issues via `getReactUpgradeDeps()`, but `vinext build` had no equivalent check. Users who bypassed `vinext deploy` and ran the build + deploy steps manually fell through this gap with no warning. **Failing behavior (before)** ``` TypeError: Cannot read properties of undefined (reading 'moduleMap') ``` Triggered at runtime on deployed Workers when `react@19.2.0` was present — no build-time warning, no actionable error. **Changes** - `buildApp()` — added `getReactUpgradeDeps()` call before the App Router build step; React `<19.2.4` is now automatically upgraded at build time, matching the behaviour already present in `vinext deploy` **What's not changed** - No changes to `vinext deploy` logic — the existing check there is unchanged - No new dependencies introduced **Closes** `moduleMap` runtime error on deployed Workers (`react@19.2.0`) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:39:30 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#379
No description provided.