TypeError: Cannot read properties of undefined (reading 'status')
What am I doing wrong?
Nextjs:
^13.2.4
Nodejs: 18.5.0
10 Replies
Literally only thing I can think of is.. maybe not in the correct route?
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
that really is strange, I can't think of anything else to be honest
well, it was a stupid mistake
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
it should be
(req, res)
and not ({req,res})
got it
for edge runtime it is
({req})
Did you figure this out
yeah, read the chats above