Getting 405 when using alias export in route file
Unanswered
Riday 💙 posted this in #help-forum
Riday 💙OP
Say, I have a function
And I am re-exporting it from a route file:
I keep getting 405 METHOD NOT ALLOWED with turbo. Though this seems to work fine without turbo (with SWC). Is this invalid syntax or something? or a bug?
// @/auth/google
export async function googleCallback(req: NextRequest) {
// This function connects to MongoDB, sets cookies() ultimately returns a redirect();
}And I am re-exporting it from a route file:
// route.ts
export { googleCallback as GET } from '@/auth/google';I keep getting 405 METHOD NOT ALLOWED with turbo. Though this seems to work fine without turbo (with SWC). Is this invalid syntax or something? or a bug?
1 Reply
Riday 💙OP
Additional info:
- Using pnpm
- Next 14.1.2 (App dir)
- Using pnpm
- Next 14.1.2 (App dir)