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() {
3131 arguments ,
3232 ) ;
3333}
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) {
2626 // transform streams. https://github.com/whatwg/streams/issues/960
2727}
2828
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
3530export const supportsRequestStorage = false ;
3631export const requestStorage = ( null : any ) ;
3732
Original file line number Diff line number Diff line change 443443 "455" : " This CacheSignal was requested outside React which means that it is immediately aborted." ,
444444 "456" : " Calling Offscreen.detach before instance handle has been set." ,
445445 "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."
447449}
You can’t perform that action at this time.
0 commit comments