question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React 18 renderToPipeableStream + pre-rendering throws error

See original GitHub issue

Hi, 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:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brilloutcommented, Nov 10, 2021

Fix released in v0.3.27.

0reactions
icarapscommented, Nov 10, 2021

Thanks for the swift responses 🚀

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found