-
Notifications
You must be signed in to change notification settings - Fork 45.8k
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
Bug: there is no renderToReadableStream function in react-dom@18.2.0 in Node.js #26906
Comments
Hello I think this is not the bug in React-dom I have checked both the official documentation repository there are mentions about the reanderToReadableStream there you wrote an incorrect code here is the updated code.
because the error says that it is the syntax error Named export 'renderToReadableStream' not found. The requested module 'react-dom/server' is a CommonJS module, which may not support all module.exports as named exports. |
@MeenuyD I tried your snippet and it doesn't work either |
Node.js exposes WebStream to global since 18.+, but |
Is it possible to add |
Ditto - often when building and testing things locally the runtime is node, while the final deploy target is edge (cloudflare, etc). Because Any particular reason to not include |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
bump |
Bump, there is no export from the ./server.node.js file. Is there a reason for it? |
I try to use
renderToReadableStream
function fromreact-dom/server
in Node.js but there is no such function in package.React version: 18.2.0
Node.js version 16.15.0 or 18.16.0
Steps To Reproduce
index.mjs
filenode index.mjs
in terminalLink to code example:
StackBlitz
The current behavior
Error in terminal:
The expected behavior
Node.js suupports web streams in experimental mode.
The package
react-dom/server
must have a functionrenderToReadableStream
according to the documentation:https://react.dev/reference/react-dom/server/renderToReadableStream
The text was updated successfully, but these errors were encountered: