@@ -8,7 +8,7 @@ import type { ParsedNextUrl } from '../shared/lib/router/utils/parse-next-url'
88import type { PrerenderManifest } from '../build'
99import type { Rewrite } from '../lib/load-custom-routes'
1010import type { BaseNextRequest , BaseNextResponse } from './base-http'
11- import type { ReadableStream } from 'next/dist/compiled/web-streams-polyfill/ponyfill'
11+ import type { ReadableStream as ReadableStreamPolyfill } from 'next/dist/compiled/web-streams-polyfill/ponyfill'
1212import { TransformStream } from 'next/dist/compiled/web-streams-polyfill/ponyfill'
1313
1414import { execOnce } from '../shared/lib/utils'
@@ -1273,7 +1273,7 @@ export default class NextNodeServer extends BaseServer {
12731273 } ,
12741274 url : url ,
12751275 page : page ,
1276- body : currentBody ,
1276+ body : currentBody as unknown as ReadableStream < Uint8Array > ,
12771277 } ,
12781278 useCache : ! this . nextConfig . experimental . runtime ,
12791279 onWarning : ( warning : Error ) => {
@@ -1352,7 +1352,7 @@ export default class NextNodeServer extends BaseServer {
13521352 */
13531353function requestToBodyStream (
13541354 request : IncomingMessage
1355- ) : ReadableStream < Uint8Array > {
1355+ ) : ReadableStreamPolyfill < Uint8Array > {
13561356 const transform = new TransformStream < Uint8Array , Uint8Array > ( {
13571357 start ( controller ) {
13581358 request . on ( 'data' , ( chunk ) => controller . enqueue ( chunk ) )
@@ -1368,8 +1368,8 @@ function requestToBodyStream(
13681368 * A simple utility to take an original stream and have
13691369 * an API to duplicate it without closing it or mutate any variables
13701370 */
1371- function teeableStream < T > ( originalStream : ReadableStream < T > ) : {
1372- duplicate ( ) : ReadableStream < T >
1371+ function teeableStream < T > ( originalStream : ReadableStreamPolyfill < T > ) : {
1372+ duplicate ( ) : ReadableStreamPolyfill < T >
13731373} {
13741374 return {
13751375 duplicate ( ) {
0 commit comments