Next.js Vercel Deployment Error
Answered
Alligator mississippiensis posted this in #help-forum
Alligator mississippiensisOP
I am encountering with this error. How can I fix it?
11 Replies
Alligator mississippiensisOP
export const handler = NextAuth(authOptions);
export {handler as GET, handler as POST};this is my code
Cape horse mackerel
and
authOptions looks like?Alligator mississippiensisOP
export const authOptions: NextAuthOptions = {
providers: [
GithubProvider({
clientId: process.env.GITHUB_ID ?? "",
clientSecret: process.env.GITHUB_SECRET ?? ""
}),
],
secret: process.env.NEXTAUTH_SECRET
}Cape horse mackerel
you should remove
export from export const handlerAnswer
Cape horse mackerel
as you're exporting it as GET/POST
Alligator mississippiensisOP
i will try it again
Cape horse mackerel
Is it working?
@Cape horse mackerel Is it working?
Alligator mississippiensisOP
oh, sorry I forgot to update you. Yes thanks a million!
but this time I have another problem
Cape horse mackerel
what's the issue?
if it's not related to this one, feel free to mark post as resolved
if it's not related to this one, feel free to mark post as resolved