throw new TypeError('Router.use() requires a middlew code example Example: throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn)) module.exports = router;