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

TaeWoo·2024년 7월 16일

nodejs

목록 보기
7/12
post-thumbnail

throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn))
의 에러를 발생했다면 routes 폴더 안에 js 파일 하단부에

module.exports = router 

를 빼먹었는지 확인해보자.

profile
코드와 아이디어의 소통, 기록하는 개발자. 🚀✨

0개의 댓글