getProviders not working with getInitialProps and getStaticProps for me #1029
Unanswered
JakubKoralewski
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here's the branch I'm trying to deploy. This is the page that's using the
getStaticProps. I have verified it works withgetServerSideProps.Error with
getStaticProps:Error with
getInitialProps:I tried setting the
NEXTAUTH_URLenv var from the heroku review app, but it didn't help. JakubKoralewski/lets-watch-it-together@4d9a136It got fixed when using
getServerSideProps. It's weird because it works withnpm run dev, and it works withnpm run buildwhenNODE_ENVis not set toproduction. This is the weird part.I'm familiar with https://nextjs.org/docs/basic-features/data-fetching#write-server-side-code-directly
"You should not fetch an API route from getStaticProps...", so if this is because of that then I can create a feature request instead.
I also conditionally enable
next-pwaonNODE_ENV=productionso I tried disablingnext-pwaand reverted back to usinggetStaticPropswithNODE_ENV=production npm run buildand it's the same error as the previousgetStaticPropsone.Beta Was this translation helpful? Give feedback.
All reactions