코드코코

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

우당탕탕/에러모음집

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

코드코코 2021. 10. 12. 19:45

router error

      throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn))
      ^

TypeError: Router.use() requires a middleware function but got a Object
//error의 원인

// routes 스크립트 제일 마지말 줄에 아래를 빼먹음
module.exports = router;