Reguarding deploying next js project on vercel
Answered
zomb posted this in #help-forum
zombOP
https://github.com/hemanthhhhhh/food-website
This is my project code.. I was trying to upload it on vercel but I'm facing an error.. Please help me resolve this
This is my project code.. I was trying to upload it on vercel but I'm facing an error.. Please help me resolve this
Answered by Yi Lon Ma
create new file, export
authOptions
from that file and import into this file and pass into NextAuth
8 Replies
English Angora
is your error only happening on deployment?
Asian black bear
The error is very clear. You are not allowed to export
authOptions
from that route handler filethe error is quite clear. You are exporting
authOptions
from that route which isn't supported so move that export to another file and just export http verbs from the route.js
filezombOP
Yea, it's running fine on localhost
English Angora
Near and Orm answered you, they know far more then me about next.js
zombOP
Can you please clarify and tell where to make changes in the code or just create a new file @Yi Lon Ma @Asian black bear
create new file, export
authOptions
from that file and import into this file and pass into NextAuth
Answer
zombOP
Ok thank you