Prerender not completing, no errors — possible runParallel issue?
Hey everyone,
I'm having some trouble with Nuxt's prerendering and I could use some help.
Sometimes, when I run the prerendering process, it doesn’t complete correctly — but it also doesn’t throw any errors. I'm using the prerender:routes hook and have crawlLinks set to false.
I've added console.log statements everywhere inside Nitro’s prerender file (even within node_modules), and it seems like the issue is with runParallel — it doesn’t always finish, and as a result, closePrerenderer is never called.
This doesn’t happen every time — but it happens often enough to break things, and I haven’t been able to identify the cause.
The problem is that it ends up generating an incomplete (and broken) version of the site.
Has anyone else encountered this? Any ideas on how to debug or fix it?
Thanks in advance!
2 Replies
Hi @ne—u. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry, but the knowledge sources provided do not contain explicit information about issues with Nitro's runParallel function during prerendering, nor do they mention incomplete prerendering without errors or the closePrerenderer function. While there are several documents discussing prerendering hooks, crawlLinks, and related bug fixes, none directly address the specific scenario where runParallel hangs or fails silently, resulting in an incomplete site.
There are, however, references to improvements in prerendering error logging and fixes for prerendering edge cases, such as always prerendering at least one page and ensuring routes are correctly seeded and discovered during static generation. These may be tangentially related, but they do not mention runParallel or the exact issue you describe. For example, recent changes have improved error reporting during prerendering, which might help surface hidden issues in future versions, but this is not directly tied to your described problem fix: log more context of prerendering errors.
If you continue to experience this issue, it may be beneficial to open a detailed issue on the Nuxt or Nitro GitHub repositories with a minimal reproduction, as this could help the maintainers investigate further.
If you have more details or logs, or if a new fix or workaround appears in the documentation, I can help you interpret it. But based on the current knowledge sources, there is no direct answer or known fix for your specific runParallel prerendering issue.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@732852565988868096> Kapa.ai is still learning and improving, please let me know how I did by reacting below.