You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m encountering persistent issues while deploying my Next.js application using NextAuth and Vercel. The deployment log shows repeated “Error: Not Found” messages, particularly for the authentication routes, during the pre-rendering phase. Additionally, I also receive prerendering page errors for various routes.
Setup:
• Tech Stack: Next.js (App Router) with NextAuth and Vercel for deployment.
• Providers: GitHub and Google OAuth Providers, as well as a custom Credentials Provider for admin authentication.
• Environment Variables: All relevant secrets (NEXTAUTH_SECRET, provider client secrets) are set in the Vercel environment settings.
Issues:
1.Error Logs: During deployment, I see the following errors:
• Error: Not Found in /api/auth/[...nextauth] route and other routes.
• Pre-rendering errors related to authentication and other pages.
2. Environment Variables: I’ve ensured all environment variables are correctly configured in Vercel and double-checked them in my code. Sensitive information is not logged, but I verify that they’re being read.
3. Testing in Development: Everything works locally. However, upon deployment to Vercel, the errors begin appearing, which makes debugging challenging.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I’m encountering persistent issues while deploying my Next.js application using NextAuth and Vercel. The deployment log shows repeated “Error: Not Found” messages, particularly for the authentication routes, during the pre-rendering phase. Additionally, I also receive prerendering page errors for various routes.
Setup:
• Tech Stack: Next.js (App Router) with NextAuth and Vercel for deployment.
• Providers: GitHub and Google OAuth Providers, as well as a custom Credentials Provider for admin authentication.
• Environment Variables: All relevant secrets (NEXTAUTH_SECRET, provider client secrets) are set in the Vercel environment settings.
Issues:
1.Error Logs: During deployment, I see the following errors:
• Error: Not Found in /api/auth/[...nextauth] route and other routes.
• Pre-rendering errors related to authentication and other pages.
2. Environment Variables: I’ve ensured all environment variables are correctly configured in Vercel and double-checked them in my code. Sensitive information is not logged, but I verify that they’re being read.
3. Testing in Development: Everything works locally. However, upon deployment to Vercel, the errors begin appearing, which makes debugging challenging.
Beta Was this translation helpful? Give feedback.
All reactions