I’m running into a strange issue with my blog project that’s hosted on Vercel.
All of a sudden, my builds are failing with a syntax error coming from the mime-db package. What’s more confusing is that even builds that were previously successful can no longer be rebuilt — they now fail with the same error.
I’m using Node 22 and running pnpm install && pnpm run build.
Has anyone experienced something similar? Any ideas on how to resolve this would be greatly appreciated.
Thanks in advance!
Vercel Staff
Hey , Is this coming from building the application (ex. next build) or some other build context (sitemap, rss, etc)? You should be able to see that in the deployment logs of what script was being executed.
That error definitely looks odd considering it says its a .json file that has a JS module.exports.
Thanks for pointing it out. I looked into it a bit more, and it seems like the error isn’t coming from next build directly — it’s likely happening during my custom RSS generation script that runs before the build.
As you can see, nothing fancy — just file reads, frontmatter parsing, and RSS XML writing.
Locally everything works fine, but the deployed environment throws an error.
I'd appreciate it if you could tell me how to debug it. Should I give you my build link by any chance?
Vercel Staff
When you say locally, you mean running the generate-rss feed script locally? Can you make sure that src/mdx/pages exists?
This topic is closed. It no longer accepts new replies.