-
Notifications
You must be signed in to change notification settings - Fork 285
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
How to use HTTP/2 with React.JS / Next.JS!?! #4253
Comments
Thanks for reporting, I would recommend you to open an issue on the Next.js tracker. However, maybe @ovflowd could help too. |
This seems to be a supported Next.js example, I am keen in thinking that this is a regression on Next.js @khteh would you mind opening an issue on vercel/next.js and check if they rule this issue out on their side first? |
Done! |
upstream vercel/next.js#50270 |
I think we can close this issue since next.js doesn't care about custom server: vercel/next.js#8625 (comment) |
Hey, can you use the latest node 20 and this patch to see if the bug is fixed? |
|
weird, I did see any usage of this function |
I can 100% confirm this is a bug outside of Node.js. My 2 cents: use libraries that do not monkey patch / depends on Node.js internals. cc @styfle @Ethan-Arrowood to coordinate a fix on the Next.js side. |
### What? If the custom server uses `app.render(xxx)` will render the normal js files as server components in dev mode and cause 404 error when loading every non-HTML file. ### How? Fixes nodejs/help#4253, fixes #50270
Apparently they updated their http2 example with an approach that seems to be working. But indeed, I wonder if they could fix this upstream and not monkeypatch said module. |
can you turn off the compression? I think next.js already know the bug on express |
It works. However,
(3) How to listen on certain URLs and respond immediately? I could do the following with Express:
(4) Does it work behind any public cloud load balancers? Does it trust the incoming
How does it look like if I switch over to your HTTP2 server? Are there any equivalents from your library? The reason why I am considering your HTTP2 library is to reduce / remove the layers of SPDY -> Express -> Next.JS. |
I would like to say that my wording was probably incorrect there. The custom server support has been basically feature complete and fairly stable for years. The thing there is that since |
Version
20.3.1
Platform
Linux khteh-p17-2i 6.2.0-33-generic nodejs/node#33-Ubuntu SMP PREEMPT_DYNAMIC Tue Sep 5 14:49:19 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
React.JS, Next.JS
What steps will reproduce the bug?
Reference: https://github.com/vercel/next.js/blob/canary/examples/with-http2/server.js
error:
- error unhandledRejection: TypeError: Cannot read properties of undefined (reading 'end')
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
No response
What do you see instead?
- error unhandledRejection: TypeError: Cannot read properties of undefined (reading 'end')
Additional information
No response
The text was updated successfully, but these errors were encountered: