mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #672] RSC streaming crash: enqueueModel is not a function (multi-route App Router) #144
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#144
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?
Originally created by @M1chaelTran on GitHub (Mar 24, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/672
Bug
App Router dev server crashes with
chunk.reason.enqueueModel is not a functionon all routes when the app has more than 1-2 pages.Single-page apps work perfectly. Adding sibling routes breaks ALL routes including ones that previously worked.
Environment
Reproduction
vite.config.ts (matches examples/app-router-cloudflare):
Works (single route):
→
GET /returns 200 with rendered HTMLFails (multiple routes):
→ ALL routes return 500 with:
Also tested:
[locale]→ same error.vitecache between tests → same errorExpected behavior
Multi-route App Router apps should render all pages without RSC streaming errors.
Additional context
The error is in the SSR dep-optimized version of
react-server-dom-webpack_client__edge.js. TheresolveModelChunkfunction at line ~995 callschunk.reason.enqueueModel()butchunk.reasondoesn't have this method when processing RSC payloads for apps with multiple route entries.@southpolesteve commented on GitHub (Mar 25, 2026):
Thanks for the detailed report!
I tried reproducing this pretty closely from what you included in the issue, including the exact version set, but I still haven’t been able to get the
chunk.reason.enqueueModel is not a functionfailure to happen. All the attempts I have tried have worked including with multiple LLM models.If you’re able to share a small GitHub repo that reproduces it, that would help a lot. Even better would be a repo plus exact run steps. If this is also happening on a deployed app, a live URL or Workers URL would be helpful too.