We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when creating a router as below in a separate file , to use as a base as below :
import { createRouter } from "next-connect"; const pipeLineRouter = createRouter(); export default pipeLineRouter .use(jwtTokenValidator_middleware) .use(dbConnection_middleware);
then importing in another API file by cloning the router as below (as suggested) :
import apiPipeline from "/lib/apiPipeline"; const router = apiPipeline.clone(); router.get(async (req, res) => { //...... }); export default router.handler(errorCather);
router.handler() fails with error :
TypeError: router.handler is not a function
However, console.log(router) gives exact same router object properties which has been cloned.
The text was updated successfully, but these errors were encountered:
This is a bug, I am fixing it right now
Sorry, something went wrong.
This is fixed in latest next version. Let me know if you still face it.
next
Successfully merging a pull request may close this issue.
when creating a router as below in a separate file , to use as a base as below :
then importing in another API file by cloning the router as below (as suggested) :
router.handler() fails with error :
TypeError: router.handler is not a function
However, console.log(router) gives exact same router object properties which has been cloned.
The text was updated successfully, but these errors were encountered: