TypeError: Cannot read properties of undefined (reading 'status')

What am I doing wrong? Nextjs: ^13.2.4 Nodejs: 18.5.0
10 Replies
deforestor
deforestor2y ago
Literally only thing I can think of is.. maybe not in the correct route?
Ali
AliOP2y ago
no, api/query/[userId] It is correct. It drives me crazy I wasted several hours on it. and still can't make a simple request! the only way it works is when I make a req on runtime
js
export const config = {
runtime: 'edge',
};
js
export const config = {
runtime: 'edge',
};
deforestor
deforestor2y ago
that really is strange, I can't think of anything else to be honest
Ali
AliOP2y ago
well, it was a stupid mistake
deforestor
deforestor2y ago
Wait, what you mean when you say you can't make this work? Like, when you call it, it doesn't work? oh you fixed it? nice
Ali
AliOP2y ago
it should be (req, res) and not ({req,res})
deforestor
deforestor2y ago
got it
Ali
AliOP2y ago
for edge runtime it is ({req})
gnarley_farley.
gnarley_farley.7mo ago
Did you figure this out
Ali
AliOP7mo ago
yeah, read the chats above
Want results from more Discord servers?
Add your server