hi, is it expected that using Supertokens with nex...
# support-questions-legacy
k
hi, is it expected that using Supertokens with next.js disables static optimization entirely? Our entire app is protected, so we get this error in the Vercel logs:
Copy code
Warning: You have opted-out of Automatic Static Optimization due to `getInitialProps` in `pages/_app`. This does not opt-out pages with `getStaticProps`
This causes some strange downstream issues for us, because now everything in our client needs to get rendered via serverless functions
r
hey @kushal5266 when you say protected your entire app, does that mean just wrapping it with the supertokensWrapper component or the SessionAuth component?
k
both!
r
Why did you need to define
getInitialProps
on the pages/_app file? That seems to be causing the issue based on the message
k
we don't have
getInitialProps
in our app file, I assumed that was coming from the Supertokens wrapper?
r
not really.
we don't use that function
k
this was a trpc issue, sorry about that!
2 Views