Fix Node.js streams: don't pass waitForAllReady in prerenderToStream
The prerenderToStream legacy path was passing { waitForAllReady: true }
to renderFizzStream, which was added in #92513. With Node.js streams
enabled, renderToNodeFizzStream defers pipeable.pipe() to onAllReady,
but the pipeable was already being piped by an earlier callback, causing
React to throw "only supports piping to one writable stream".
The web stream path ignores this option (it's a no-op), which is why
the bug only manifests with __NEXT_USE_NODE_STREAMS=true.
Remove { waitForAllReady: true } from both the main and error Fizz
render calls in prerenderToStream. The prerender path already handles
stream completion separately.
Fixes production builds failing on /_not-found when the root layout
wraps children in <Suspense>.
Showing
Please
register
or
sign in
to comment