Closed jaepass closed 4 years ago
Hmmn there's a new error now. You might have to try using yarn deploy
locally to go through issues as they occur.
hm yea now the error is not being able to read the properties from the order object. this is odd, wasn't happening til now, will yarn deploy
and look locally
im thinking it has something to do with Next somehow thinking checkout/confirm
is ssr and to prepopulate with prop that simply doesn't exist
λ /checkout/confirm
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
Error occurred prerendering page "/checkout/confirm". Read more: https://err.sh/next.js/prerender-error
I wonder what happens if you start that render function with
if (!orderReceipt) {
return null;
}
ah so just running yarn build
works with no build errors.
https://nextjs.org/docs/advanced-features/static-html-export talks about caveats with next export
with getInitialProps()
pages.
error is directly pointed to next.js trying to pre-render order/confirm
at build time and Next.js opting out of automatic static optimization due to there being getInitialProps()
. hm so looks like essentially every page that doesn't have getStaticProps()
is automatically ssr.
https://github.com/zeit/next.js/issues/9285
Does removing next export
work?
sorry for the builds and commits, just trying to isolate some scenarios. trying to manually disable ssr on the order page
known build error: https://github.com/zeit/next.js/issues/8014
FIXED:
Confirm
component, and turning off ssr on confirm
page level
orderReceipt
object not persisting when inprintReceipt
component so got rid of iFrame as it was just overcomplicating the taskconfirm
component with hidden elements