Next.js Discord

Discord Forum

Next requests /_next/data/.../route.json - which 404s?

Unanswered
Northeast Congo Lion posted this in #help-forum
Open in Discord
Northeast Congo LionOP
Look at the console here https://shaderfrog.com/2/

Why does next request these non-existent JSON files? Can I disable it or make it not 404? For example it requests https://shaderfrog.com/_next/data/h17kh7UXtUkE26wZjlWZZ/2/editor/create/three.json

It looks like it might be trying to pre cache route data?

4 Replies

Northeast Congo LionOP
I see these paths mentioned in the production build routes-manifest.json

{"page":"/members/account","dataRouteRegex":"^/_next/data/e3jDppn5bQokvlQmc6QtY/members/account.json$"}
Northeast Congo LionOP
Each of the routes has a getServerSideProps that is wrapped in a helper HOF

export const getServerSideProps = withSsrPropsUser(async (context, user) => {
i'm guessing the static generation is running at build time - somehow not properly calling getServerSideProps - and failing to build the json static cache?
these are not static pages either as you can see by getServerSideProps