I recently tested a set of Next.js templates (landing page, SEO files, OG images, an MDX blog) in a fresh create-next-app project on Next.js 16.4.6 , twice: once as a static export and once as a server build with Cache Components.
Everything compiled in my head. Four things broke in practice, and none of them is obvious from the docs. Here they are, with the exact errors and the fixes that worked.
1. Static export and Cache Components don't mix
New projects from create-next-app 16.4 start with this config:
const nextConfig : NextConfig = { cacheComponents : true , partialPrefetching : true , } ;
Enter fullscreen mode
Exit fullscreen mode
Add output: "export" for a static site (Cloudflare Pages, GitHub Pages, Netlify), plus an opengraph-image.tsx or sitemap.ts , and the build stops:
Error: export const dynamic = "force-static"/export const revalidate not configured on route "/opengraph-image" with "output: export".
Enter fullscreen mode
Exit fullscreen mode
The obvious fix makes it worse:
Error:…