Render Next.js is caching pages

Our Next.js site is not reloading its data when deployed to Vercel. It’s an SSR site and always sends back the same data.

We used the Node option here:

This may be a set up issue, but the exact same site works fine on Vercel which is strange.

In the end we just moved it to Vercel so I guess not that relevant anymore.

Hi, were you able to get Render working in the end with Next.js?

I’ve not been able to and have had to stay with Vercel. I’d like to use Render though.

Hey,

In the end it was a separate issue. We had a similar issue on Vercel. It was a bug in our code and how we were using Apollo Client with SSR that it wasn’t returning new results.

Hosting will likely be cheaper/free on Vercel for us. At least starting out. Our backend and CRA frontend is hosted on Render though 😊

Hi there,

Thanks for letting me know!

My frontend is working on Vercel but unfortunately as I’m using Keystonejs, Safari prevents Cross Site Tracking by default which means users cannot log-in to their accounts.

I was hoping to get the front end working on the same place as the backend to see if that bypasses the issue.

When I have tried different settings for the Build Command, I can get the build to work but then I receive a Not Found error on the page. It seems to be related to the Publish Directory settings but the information on Render appears to be incorrect.

Hi @stevencmh,

Can you share the service you set up with me so I can take a look? Also what are the build and run commands in your package.json?

Hi,

Thanks for getting back to me. I’ve followed the instructions here: https://render.com/docs/deploy-nextjs-app#deploy-as-a-static-site

This is just a test site but there are two issues – the first is that is that the images don’t load. Please see the logo top-left: Number 6 | Title

Hi @stevencmh,

I took a look a where the browser is trying to load that image and I looks like its not able to find it because it is in a different directory other than “public”. NextJS can serve static files from that public directory Basic Features: Static File Serving | Next.js. Let me know if that works for you!

Hi,

Thanks for getting back to me :slight_smile:

The logos are in the public directory already…