React 18 renderToPipeableStream + pre-rendering throws error
See original GitHub issueHi, first of all hats off ! This is an awesome plugin 👍
I’m trying to run the plugin with React 18 renderToPipeableStream
+ hydrateRoot
+ render
API changes and its runs fine but if I try to do pre-rendering, it throws the following error:
Error: [vite-plugin-ssr@0.3.26][Internal Failure] You stumbled upon a bug in `vite-plugin-ssr`'s source code (an internal `assert()` failed). This should definitely not be happening, and you should create a new GitHub issue at https://github.com/brillout/vite-plugin-ssr/issues/new that includes this error stack (the error stack is usually enough to debug internal errors). Or reach out on Discord. A fix will be written promptly.
at Writable.write [as _write] (/project/node_modules/vite-plugin-ssr/dist/cjs/node/html/stream.js:66:32)
at write (/project/node_modules/vite-plugin-ssr/dist/cjs/node/html/stream.js:212:42)
at /project/node_modules/vite-plugin-ssr/dist/cjs/node/html/stream.js:215:47
at Array.forEach (<anonymous>)
at writeData (/project/node_modules/vite-plugin-ssr/dist/cjs/node/html/stream.js:215:32)
at write (/project/node_modules/vite-plugin-ssr/dist/cjs/node/html/stream.js:150:13)
at onData (/project/node_modules/vite-plugin-ssr/dist/cjs/node/html/stream.js:173:13)
at async Writable.write [as _write] (/project/aio-site-template/node_modules/vite-plugin-ssr/dist/cjs/node/html/stream.js:242:17)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Upgrading to React 18 on the server · Discussion #22 - GitHub
In React 18, we're adding very limited <Suspense> support to renderToString . Previously, trying to use <Suspense> with it threw an error.
Read more >ReactDOMServer – React
ReactDOMServer.renderToPipeableStream(element, options). Render a React element to its initial HTML. Returns a stream with a pipe(res) method to pipe the ...
Read more >Streaming Server Rendering with Suspense - YouTube
Data Fetching with React Server Components · Streaming SolidJS - Server Rendering · React 18 for app developers · React 18 Overview -...
Read more >react-hydration-error - Next.js
When css-in-js libraries are not set up for pre-rendering (SSR/SSG) it will often lead to a hydration mismatch. In general this means the...
Read more >Using React Suspense for Better Server-Side Rendering
Instead of the traditional renderToString method, React 18 introduces renderToPipeableStream , that support React Suspense and lazy loading out-of-the-box.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fix released in
v0.3.27
.Thanks for the swift responses 🚀