Bug
After a successful vinext deploy, the deployed Worker crashes on every request with:
TypeError: Cannot read properties of undefined (reading 'moduleMap')
HTTP response: 500 error code: 1101 (Worker threw an unhandled exception)
Environment
- vinext: 0.0.13
- React: 19.2.0
- Next.js: 15.2.x
- Deployment: Cloudflare Workers (via
vinext deploy or wrangler deploy --config dist/server/wrangler.json)
Steps to reproduce
vinext build completes successfully
wrangler deploy using the generated dist/server/wrangler.json
- Visit the deployed URL — Worker immediately returns 500/1101
- The error is
Cannot read properties of undefined (reading 'moduleMap') from the RSC layer
Root cause (suspected)
The RSC client manifest / module map is not being correctly initialized or passed between the RSC server layer and the SSR edge environment. The dist/server/ worker attempts to use the module map before it's populated.
Workaround
Use Next.js output: 'export' (static export) and deploy the out/ directory as a static asset Worker:
# wrangler.toml
name = "my-app"
compatibility_date = "2026-02-27"
workers_dev = true
[assets]
directory = "./out"
This bypasses RSC/SSR entirely and works reliably, though it sacrifices server-side rendering.
Expected behavior
The deployed Worker should serve the app successfully without RSC initialization errors.
Bug
After a successful
vinext deploy, the deployed Worker crashes on every request with:HTTP response:
500 error code: 1101(Worker threw an unhandled exception)Environment
vinext deployorwrangler deploy --config dist/server/wrangler.json)Steps to reproduce
vinext buildcompletes successfullywrangler deployusing the generateddist/server/wrangler.jsonCannot read properties of undefined (reading 'moduleMap')from the RSC layerRoot cause (suspected)
The RSC client manifest / module map is not being correctly initialized or passed between the RSC server layer and the SSR edge environment. The
dist/server/worker attempts to use the module map before it's populated.Workaround
Use Next.js
output: 'export'(static export) and deploy theout/directory as a static asset Worker:This bypasses RSC/SSR entirely and works reliably, though it sacrifices server-side rendering.
Expected behavior
The deployed Worker should serve the app successfully without RSC initialization errors.