ISR SSG page gives "404 Not Found", but only in Vercel #5935
Replies: 6 comments
-
In this component I had a fetch, written like this: const response = await fetch(`${endpoint}?format=json`, {
cache: "no-cache", // also tried "no-store" with same issue
});
const jobData = await response.json();
console.log("jobs fetched", jobData.length); I tried, on a whim, to change this to: const response = await fetch(`${endpoint}?format=json`, {
next: {
revalidate: 180,
},
});
const jobData = await response.json();
console.log("jobs fetched", jobData.length); which for some unapparent reason seems to be working?... I feel like there's a bug in Vercel here. |
Beta Was this translation helpful? Give feedback.
-
Posted an issue in Next repo here |
Beta Was this translation helpful? Give feedback.
-
Hey, im facing the same issue but with pages router It wasnt happening before, now often i see some pages are present in the deployment, but they gives 404 recently i saw even static pages giving 404 |
Beta Was this translation helpful? Give feedback.
-
Thanks for sharing 🙏 We'll take a look into this. |
Beta Was this translation helpful? Give feedback.
-
Hi, a fix for this has been rolled out, please re-deploy and give it a try! |
Beta Was this translation helpful? Give feedback.
-
This discussion was automatically locked because the community moved to a new site. Please join us at vercel.community |
Beta Was this translation helpful? Give feedback.
-
Summary
I'm at the end of my rope with this now...
A specific page in my application suddenly started responding with "404 Not Found" but only when deployed to Vercel. Running locally, either via
npm run dev
ornpm run start
with a production build both work perfectly fine. The output in the build log is, as far as I can tell, identical between Vercel and local build.Anyone have any clues where I can figure this out? All google results give the same "use rewrites to redirect everything back to /" which doesn't seem applicable in a Next 14 App Router application scenario.
Example
No response
Steps to Reproduce
Log from
generateStaticParams
in VercelFurther down the log, in the build Route summary
Vercel deployment ISR summary, missing Career
404 Network request for deployed version
Some context and questionsmarks
The route is printed in the Route output of the build step, but its' corresponding ISR function is not shown in the output in Vercel?
It's one of 10 dynamic pages in
src/(site)/[...slug]/page.tsx
Removing one specific Server Component block in the CMS on this particular page makes the page found again...? But if this component has some sort of issue it's not showing any errors anywhere, and I don't see why it would work locally without issue then?
I also tried doing
vercel build
and thenvercel deploy
from my terminal to make sure it's not the Github connection acting up somehow, but no luck.Beta Was this translation helpful? Give feedback.
All reactions