-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
with-http2 example exposes problems when converted to typescript #8625
Comments
Error1, I might be need that render() support http2 types. like this
Error2, using querystring
|
I made these changes:
The second error is fixed now, but the first error is still there, with a different message now but same underlying problem:
|
I suspect this issue might be related to underlying problems in how Express implements http vs http2 request abstractions: |
for 1 issues, next-server.d.ts might be changed to
but I'm not sure it is the best solution |
We now take PRs to convert existing examples to TS, but
https://nextjs.org/docs/advanced-features/custom-server Since the example is working as expected in its current form, I'm closing this issue. UPDATE: nodejs/help#4253 (comment) |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
Using the with-http2 example, and then converting server.js to server.ts, the following line has two problems:
return app.render(req, res, '/about', req.query)
Error 1:
Error 2:
Property 'query' does not exist on type 'Http2ServerRequest'.ts(2339)
To Reproduce
Create a new project following instructions at with-http2:
Expected behavior
The with-http2 probably has some bugs that are not visible until being converted to typescript. The idea of with-http2 is useful, and ideally there would be an http2 template like this.
System information
Node 12.8.0
The text was updated successfully, but these errors were encountered: