mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #31] [MERGED] fix: install react-server-dom-webpack during init and deploy for App Router #254
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#254
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/31
Author: @southpolesteve
Created: 2/24/2026
Status: ✅ Merged
Merged: 2/25/2026
Merged by: @southpolesteve
Base:
main← Head:fix/create-next-app-missing-rsdw📝 Commits (5)
9c8a540fix: install react-server-dom-webpack during init and deploy for App Routerb866be0refactor: use createRequire for package resolution instead of direct node_modules readsdb455c8ci: add Windows to create-next-app smoke testd4ad795fix: use pathToFileURL for dynamic import() calls on Windows4ddd18afix: pathToFileURL for cache-runtime codegen and test imports📊 Changes
8 files changed (+382 additions, -24 deletions)
View changed files
📝
.github/workflows/ci.yml(+71 -0)📝
packages/vinext/src/cli.ts(+5 -1)📝
packages/vinext/src/deploy.ts(+37 -1)📝
packages/vinext/src/index.ts(+10 -10)📝
packages/vinext/src/init.ts(+76 -1)📝
tests/deploy.test.ts(+64 -1)📝
tests/init.test.ts(+109 -1)📝
tests/pages-router.test.ts(+10 -9)📄 Description
Summary
Fixes #22 —
vinext initon a freshcreate-next-appproject fails withCould not resolve "react-server-dom-webpack/server.edge".Root Cause
Two compounding issues:
Missing dependency:
getInitDeps()didn't includereact-server-dom-webpackin the list of packages to install duringvinext init. While vinext lists it as a direct dependency, Vite needs it resolvable from the project rootnode_modules/, not nested insidevinext/node_modules/.React version mismatch:
react-server-dom-webpack@19.2.4requiresreact@^19.2.4as a peer dep, butcreate-next-app@latestshipsreact@19.2.3. This version conflict causes npm to either nest rsdw (npm 7-9) or hard-fail withERESOLVE(npm 11+).Fix
react-server-dom-webpacktogetInitDeps()for App Router projectsgetReactUpgradeDeps()that detects when the installed React is too old for rsdwreactandreact-domas regular dependencies (without-D) to maintain their position independenciesrather thandevDependenciesvinext deployfor parity (per AGENTS.md guidance)create-next-appproject, runsvinext init, starts the dev server, and verifies HTTP 200Testing
getReactUpgradeDeps, rsdw dependency detection, and React upgrade orderingcreate-next-appCI job validates the end-to-end flow🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.