File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -31,3 +31,17 @@ export function renderToReadableStream() {
31
31
arguments ,
32
32
) ;
33
33
}
34
+
35
+ export function renderToNodeStream ( ) {
36
+ throw new Error (
37
+ 'ReactDOMServer.renderToNodeStream(): The Node Stream API is not available ' +
38
+ 'in Bun. Use ReactDOMServer.renderToReadableStream() instead.' ,
39
+ ) ;
40
+ }
41
+
42
+ export function renderToStaticNodeStream ( ) {
43
+ throw new Error (
44
+ 'ReactDOMServer.renderToStaticNodeStream(): The Node Stream API is not available ' +
45
+ 'in Bun. Use ReactDOMServer.renderToReadableStream() instead.' ,
46
+ ) ;
47
+ }
Original file line number Diff line number Diff line change @@ -26,12 +26,7 @@ export function flushBuffered(destination: Destination) {
26
26
// transform streams. https://github.com/whatwg/streams/issues/960
27
27
}
28
28
29
- // For now we support AsyncLocalStorage as a global for the "browser" builds
30
- // TODO: Move this to some special WinterCG build.
31
- // export const supportsRequestStorage = typeof AsyncLocalStorage === 'function';
32
- // export const requestStorage: AsyncLocalStorage<
33
- // Map<Function, mixed>,
34
- // > = supportsRequestStorage ? new AsyncLocalStorage() : (null: any);
29
+ // AsyncLocalStorage is not available in bun
35
30
export const supportsRequestStorage = false ;
36
31
export const requestStorage = ( null : any ) ;
37
32
Original file line number Diff line number Diff line change 443
443
"455" : " This CacheSignal was requested outside React which means that it is immediately aborted." ,
444
444
"456" : " Calling Offscreen.detach before instance handle has been set." ,
445
445
"457" : " acquireHeadResource encountered a resource type it did not expect: \" %s\" . This is a bug in React." ,
446
- "458" : " Currently React only supports one RSC renderer at a time."
446
+ "458" : " Currently React only supports one RSC renderer at a time." ,
447
+ "459" : " ReactDOMServer.renderToNodeStream(): The Node Stream API is not available in Bun. Use ReactDOMServer.renderToReadableStream() instead." ,
448
+ "460" : " ReactDOMServer.renderToStaticNodeStream(): The Node Stream API is not available in Bun. Use ReactDOMServer.renderToReadableStream() instead."
447
449
}
You can’t perform that action at this time.
0 commit comments