Closed wortkotze closed 4 years ago
i'm encountering this issue too.
There seems to be a problem with the middleware as req.db
is not set in pages/api/users.js
.
but i haven't found a solution yet.
Thanks for reporting. I will check on this ASAP.
@wortkotze @dhacquebord
Hey, sorry for the trouble. This is an upstream bug in next-connect
. Upgrading next-connect
to the latest version will fix the issue.
below update will work
// next.config.js
module.exports = {
onDemandEntries: {
// period (in ms) where the server will keep pages in the buffer
maxInactiveAge: 25 * 1000,
// number of pages that should be kept simultaneously without being disposed
pagesBufferLength: 2,
},
pageExtensions: ['mdx', 'jsx', 'js']
}
The issue seems to be resolved. Please check out the latest code. Ping me if it still persists for you guys.
Hi,
I wanted to check out your boilerplate but i recieve the following errors after a fresh install
(node:7661) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'end' of undefined at next (/Users/steve/Documents/Programming/worryeater.net/worryeater_nextjs/node_modules/next-connect/lib/index.js:40:52) at next (/Users/steve/Documents/Programming/worryeater.net/worryeater_nextjs/node_modules/next-connect/lib/index.js:57:7) at Function.handle (/Users/steve/Documents/Programming/worryeater.net/worryeater_nextjs/node_modules/next-connect/lib/index.js:62:3) at connect (/Users/steve/Documents/Programming/worryeater.net/worryeater_nextjs/node_modules/next-connect/lib/index.js:2:11) at Object.apiResolver (/Users/steve/Documents/Programming/worryeater.net/worryeater_nextjs/node_modules/next/dist/next-server/server/api-utils.js:39
any ideas?