I have been working on implementing some of the updates from Next 9.3. I have been moving from getInitialProps
to getServerSideProps
and noticed that my exportPathMap
became unhappy with these pages becoming dynamic. Everything works fine running next
, but when I go to run next build && next export
, I run into some issues.
In the docs for static html export it states If your pages don't have getInitialProps you may not need next export at all; next build is already enough thanks to Automatic Static Optimization.
I am able to get that to work happily with my new getServerSideProps
calls when I run next build && next start
. What steps do I need to take in order for that to also work with next export
so I can deploy via Netlify. Here's an example of the error I am getting when I attempt to run next export
Error occurred prerendering page "/videos/[videos_title]". Read more: https://err.sh/next.js/prerender-error:
Error: Error for page /videos/[videos_title]: pages with `getServerSideProps` can not be exported. See more info here: https://err.sh/next.js/gssp-export