throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn)) 의 에러를 발생했다면 routes 폴더 안에 js 파일 하단부에
module.exports = router
를 빼먹었는지 확인해보자.