Skip to content

Vercel ISR: Direct navigation to an ISR route returns 404 (Nuxt 4.1.3 / Nitro 2.12.7) #3651

Description

@ps-20x

Environment

nuxt: "4.1.3",
nitropack: "2.12.7",
node: "Vercel runtime (Node 22.x)"

Nuxt config (relevant excerpt)

// nuxt.config.ts
export default defineNuxtConfig({
  routeRules: {
    "/fachrichtungen": {
      isr: {
        allowQuery: ["location"],
        expiration: 3600,
        passQuery: true,
      },
    },
  },
})

Deployment target

  • Vercel (Free plan)
  • Zero-config deployment using Nitro’s vercel preset

Reproduction

Steps:

  1. Open the live URL above directly in a new tab (or hard-refresh).
  2. Observe a 404.
  3. From the home page (/), click a link to the ISR route (client-side navigation).
  4. First hit renders; subsequent hits are served from cache as expected.

Describe the bug

Incremental Static Regeneration works on client-side navigation, but direct navigation (entering the URL or hard-refresh) to an ISR route returns a 404 on Vercel.

This looks like the same problem discussed in Nuxt issue nuxt/nuxt#33316 which was closed after a Nitro fix, but it still reproduces with current versions.

Expected behavior

Direct navigation to an ISR route should generate (on first request) and then serve the cached page (or serve cached content if it already exists), same as client-side navigation.

Actual behavior

  • Direct navigation / hard-refresh returns 404 for the ISR route.
  • Client-side navigation to the same route works (first request generates, subsequent are cached).

Additional context

Logs

* Vercel request shows 404 for direct navigation to `/fachrichtungen`.

[request error] [fatal] [GET] /fachrichtungen-isr?
 H3Error: Page Not Found
    at createError$1 (file:///var/task/chunks/nitro/nitro.mjs:943:15)
    at createError (file:///var/task/chunks/build/server.mjs:478:21)
    at setup (file:///var/task/chunks/build/_...slug_-DkjO_2q9.mjs:5931:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  cause: { fatal: true, statusCode: 404, statusMessage: 'Page Not Found' },
  statusCode: 404,
  fatal: true,
  unhandled: false,
  statusMessage: 'Page Not Found',
  data: undefined
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions