-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: ReactDOMServer.renderToReadableStream is not a function #4608
Comments
10.24.0 hasn't changed anything relating to exports https://github.com/preactjs/preact/releases/tag/10.24.0. We've also never had that export so maybe something else got upgraded? |
I thought it might've been the case, but giscus/giscus#1576 shows that it is preact 10.24.0 (only) that caused the build to fail 😔 All the other packages (except Next.js ones) updated without issue giscus/giscus#1574. |
That's very odd, we've never had that export in https://github.com/preactjs/preact/blob/main/compat/server.mjs#L11-L15 - kind of confused how that's possible, maybe because we updated the fake compat version Next thinks it can start leveraging the stream #4488 |
Indeed, Next sniffs out the React version and alters behavior (rather considerably) for 18.0+. Any reason to avoid re-exporting it? Next may or may not work well with it of course, but that's a separate issue. |
I am personally not confident in our streaming implementation atm as it's not battle tested so our issue counter might explode if we do 😅 |
Describe the bug
Hi! I'm trying to update https://github.com/giscus/giscus to the latest Preact version (10.25.2) and I got a
TypeError: ReactDOMServer.renderToReadableStream is not a function
when I try to load any page. Not sure how helpful it is, but here's the stack trace:Stack trace
To Reproduce
Honestly, it's probably my fault for still using Next.js that no longer supports Preact. I'm on Next.js 12.3.4 and next-plugin-preact 3.0.7, as those are the last versions that still work together.
I should probably either move on from Next.js or Preact, but I thought this could possibly a legit bug in Preact, so I'm raising this anyway. Feel free to close this if whatever caused this was intended.
For the record, this still worked fine in 10.23.2. Trying the versions between that and the latest 10.25.2, I found that it started to break in 10.24.0. I couldn't find anything in the release notes that could be related. The closest is probably #4490, but I'm not sure why a warning would cause it to crash.
Expected behavior
I expect it to work just fine, like in 10.23.2.
The text was updated successfully, but these errors were encountered: