-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
vercel/next.js
#56768Description
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
const app = next({ dev, hostname, port, dir: __dirname })
const server = http2.createSecureServer({
key: fs.readFileSync('server.key'),
cert: fs.readFileSync('server.crt')
})
app.prepare().then(() => {
})
server.on('request', (req, res) => {
console.log(`request ${req.url}`)
app.render(req, res, req.url || '/', req.query)
})
server.listen(port, (err) => {
if (err) {
console.error('Failed to start server', err)
process.exit(1)
} else {
console.log(`HTTP/2 server listening on port: ${port}`)
}
})
}).catch(err => next(err))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
Metadata
Metadata
Assignees
Labels
No labels