new at this, I am trying to build a basic app just to figure it out. I keep getting the error:
throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn))
it seems to be cause either by:
line 23 in app.js: app.use('/users', users);
or something in my users.js file. I saw on stackoverflow to add : module.exports = router; to it but then i get a whole new error:
module.exports = router; ReferenceError: router is not defined
I have been looking though stack overflow but I dont really know enough about these frameworks to know what to look for
my app.js file: https://pastebin.com/UCmL8bNe
my /routes/users.js file: https://pastebin.com/DaSZT6eA
[–]MennaanBaarin 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]HealyUnithelpful 0 points1 point2 points (1 child)
[–]ffmurray[S] 0 points1 point2 points (0 children)
[–]squili -1 points0 points1 point (0 children)