Next.js 9.3 and getServerSideProps not working

Hi, I’ve had a look to see if anyone has posted an issue already, but couldn’t find anything. So, thought I’d report an issue…

It would appear the ‘getServerSideProps’ added in 9.3 doesn’t work on netlify. When requesting the same url, netlify doesn’t call the api and render a new page, instead it returns the generated page. I have verified this on the ‘zeit.co’ service and it works as expected.

I had to turn off the asset optimisations (which I turned on) to get other functionality working, but that doesn’t appear to have fixed this issue. Does anyone know if version 9.3 is supported or why getServerSideProps wouldn’t work on netlify?

Thank you

1 Like

I’m wondering whether my config is wrong. So I have changed the build command from ‘next build && next export’ to just ‘next build’. But, what should the output directory be? Neither ‘out/’ or ‘.next/’ work.

1 Like

hi there, which site is this regarding?

Hiya, sorry you are having trouble with your build.

This Common Issue contains a ton of useful debugging tips.

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, your most recent build/deploy log, etc. thanks!