-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
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
export const authOptions produces error #7498
Comments
Yeah, same problem here. |
Getting something similar, which I believe is a related if not same underlying issue with
|
Fixed it by moving the authOptions export to another file that's not a route. Also, make sure you follow the Route Handler guide for |
This was the strangest thing! I was exporting So I imported authOptions from a different file (that exports on its own) and now it's working. STRANGE! But I'm grateful that the answer was already shared! |
Question 💬
I was following the examples on this page: https://next-auth.js.org/getting-started/example#add-api-route which gave me the following error
which is confusing me, since
is then unusable? The error goes away if you remove the
export
fromexport const authOptions
I'm on
next@13.4.1
andnext-auth@4.22.1
and I'm using the new app directoryHow to reproduce ☕️
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
The text was updated successfully, but these errors were encountered: