404 when redeploy
Environment
- Operating System: Linux
- Node Version: v18.15.0
- Nuxt Version: 3.5.3
- Nitro Version: 2.4.1
- Package Manager: [email protected]
- Builder: vite
- User Config: app, alias, content, nitro, modules, components, tailwindcss, pinceau, github, colorMode, runtimeConfig
- Runtime Modules: @nuxtjs/[email protected], @nuxt/[email protected], @vueuse/[email protected], pinceau/nuxt, @nuxtjs/[email protected], @nuxt/[email protected]
- Build Modules: -
Reproduction
- create any project using nuxt/content,
- do a deploy (or npm run generate),
- run a page (npm run preview),
- open website, go to some page,
- do a new deploy (npm run generate),
- run the page again (npm run preview),
- navigate the user to another subpage (eg. /about)
the result is a 404.
The user is forced to refresh the page by themselves
Describe the bug
After switching to another page when deploy was performed in the background, nuxt searches for the "old" file, which already has a different name
Additional context
How can I capture the change in chunks? Nuxt supposedly already supports changing chunks https://github.com/nuxt/nuxt/pull/19086, why doesn't nuxt-content do that? And how can I do it with my own? Without creating an infinite refreshing loop on the 404 page.
Logs
No response
I'm running into this same issue myself. I wonder if this issue would get addressed when this PR (https://github.com/nuxt/nuxt/pull/28160) gets merged in, since that'd reload the page when a chunk error is emitted. From what I can tell a chunk error gets raised at the same time as the Nuxt content 404. Ideally speaking though, it'd be nice if there was some way to avoid this behavior in Nuxt content directly.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.