Deployment blocked: “export const dynamic” not configured on /sitemap.xml with output: export
I’m experiencing a persistent deployment error that’s blocking my project from building, even after reverting to previous commits.
Environment:
- Framework: Next.js with output: ‘export’
- Deployment: Vercel
- Build tool: v0.app
The Error:
My Setup:
- Static sitemap.xml file in
/public/sitemap.xml - next.config.js has
output: 'export'configured - No dynamic sitemap files exist in
/app(confirmed by search) - Using v0.app to generate/manage the project
What I’ve Already Tried:
- Cleared
.nextand.verceldirectories - Reverted to multiple previous commits - error persists
- Verified there are NO files:
app/sitemap.ts,app/sitemap.js,app/sitemap.xml/route.ts - v0 AI assistant confirmed no dynamic sitemap generation exists
- Added configuration changes suggested by support - didn’t help
- Vercel support said to clear cache and redeploy - error still occurs
Build Logs Show:
The error references:.next/server/app/sitemap.xml/route.js:5:3- which is generated automatically during build, not a file I created.
The Core Issue:
Next.js is auto-generating a dynamic route handler for/sitemap.xmlthat conflicts withoutput: export, but I only have a static sitemap.xml file.
Has anyone encountered this? Any solutions would be greatly appreciated!
Thanks,
Omar