Next.js Discord

Discord Forum

NextJs 16 -> clicking on next/link returns text/html instead of application/json

Unanswered
Segugio dell'Appennino posted this in #help-forum
Open in Discord
Segugio dell'AppenninoOP
Migrated to NextJs 16 pages router from NextJs 14 pages router
Using [sst.dev](https://sst.dev/) for deploying NextJs application which uses opennext to package nextjs

Previously,
User hovers over a link -> a prefetch request is sent, response is empty object {}
User then clicks the link -> a request is sent to /_next/data/..../abc.json and the response is of type application/json ; PageProps present

Now,
Everything works fine locally,
On Production however,
User hovers over a link -> a prefetch request is sent, response is empty object {}
User then clicks the link -> a request is sent to /_next/data/..../abc.json and the response is of type text/html and pageProps are empty {}

0 Replies