TypeError: Router.use() requires middleware function but got a Object

后端 未结 9 1309
被撕碎了的回忆
被撕碎了的回忆 2020-11-29 20:30

There have been some middleware changes on the new version of express and I have made some changes in my code around some of the other posts on this issue but I can\'t get a

9条回答
  •  迷失自我
    2020-11-29 21:30

    You are missing router exports module and that is the reason why this error is present.

    use module.exports = router; and that would work

提交回复
热议问题