Next.js Discord

Discord Forum

Why is it that when I upload json server to vecel server.use it doesn't work and server.get works b

Unanswered
Thai posted this in #help-forum
Open in Discord
ThaiOP
Why is it that when I upload nodejs json server to vecel server.use it doesn't work and server.get works but the condition doesn't work?

6 Replies

@Thai Why is it that when I upload nodejs json server to vecel server.use it doesn't work and server.get works but the condition doesn't work?
when you say "didn't work" are you refering to typescript error or actual runtime error?
also body isn't a thing for GET request, and is valid for POST... so you may have gotten an error that last_name doesn't exist on null | any or something (which is just TS not knowing about the type and is easy fix)
it may include formdata on GET but i can't remember
is there an error message too?
@riský is there an error message too?
ThaiOP
no start 😦