Skip to content
Advertisement

Getting “TypeError: res.status is not a function.”

TypeError: res.status is not a function at auth (D:PROJECTWeb ApplicationLearning ReactMERN STACKmiddlewareauth.js:17:9). I am getting this error. The code is given below.

JavaScript

Error ScreenShot

Advertisement

Answer

It should be req, res, next

Change

JavaScript

to

JavaScript

https://expressjs.com/en/guide/using-middleware.html

Advertisement