Can I use renderReadableStream? #100
Unanswered
nickytonline
asked this question in
Q&A
Replies: 3 comments
-
Doesn't Node 18 support web streams now? If so could the flow be improved in that version? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@jahvi, I saw that and upgraded ran the project to use Node 18 but still ran into errors about WebStreams not being supported. I'm going to take peek at this again as I wonder if maybe the Remix dev server, what we're running when |
Beta Was this translation helpful? Give feedback.
0 replies
-
See facebook/react#24226 @jahvi. I may move the template back to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Yes, you can use renderReadableStream. It was in the Netlify Edge Functions template initially before #101. Still, it made using the template difficult from a DX standpoint.
You had to first run
netlify build,
and then you could runnetlify dev
to develop your site. See #92. The developer experience is much better now, where you can runnetlify dev
and make changes as you would expect.However, this means we had to revert to renderToString because the Remix development server is running Node.js which does not support Web Streams, what
renderToReadableStream
uses.You can replace your
entry.server.server.tsx
file with the one in fd3139b.The development flow would be to run:
npx remix watch
netlify build
netlify dev
To be clear, this is not a limitation of the Netlify CLI. It's due to a lack of Web Streams support in Node.js, as the
renderToReadableStream
docs mention, which the Remix dev server runs on.Beta Was this translation helpful? Give feedback.
All reactions