there are several issues with the same theme, but I could not solve my problem.
Error: Route.post() requires callback functions but got a [object Undefined] at R
In my case it was because I had a misspelling between the router and controller file. Check both so that they match, the error .POST() requires callback functions but got a [object Undefined] has nothing to do with the real problem.
.POST() requires callback functions but got a [object Undefined]