Nuxt: No page component found during Nitro static generation of dynamic routes
0 reputation · 21 Jul 2024, 14:05 UTC
Goal: pre-render every dynamic route in a Nuxt 3 application using Nitro static generation in a repeatable CI/CD pipeline, without manually editing nuxt.config.ts whenever content changes.
Nuxt 3 uses Vite and Nitro instead of the Webpack-based route discovery found in Nuxt 2. The documented error "Nuxt: No page component found" means the route resolver could not map a requested URL to a Vue component in the pages directory. During SSG, dynamic routes currently require explicit enumeration in generate.routes or discovery by the built-in crawler. A standardized pattern-based placeholder for generate.routes is not documented, and client-side navigation can mask missing components until server-side generation runs.
This assumes Nuxt 3.x with Nitro. Placeholder behavior should be treated as unverified for production pipelines.
Does Nitro's generate.routes support glob or pattern-based placeholders for dynamic routes? What is the documented repeatable method for pre-rendering dynamic routes when the full path list is unknown at build time? Is crawler-based discovery sufficient for deterministic CI/CD output?