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 file@zomb 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
the 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
file@English Angora is your error only happening on deployment?
zombOP
Yea, it's running fine on localhost
@zomb 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
@zomb Can you please clarify and tell where to make changes in the code or just create a new file <@510480545160101898> <@141252432054190080>
create new file, export
authOptions
from that file and import into this file and pass into NextAuth
Answer