content icon indicating copy to clipboard operation
content copied to clipboard

404 when redeploy

Open gitFoxCode opened this issue 2 years ago • 1 comments

Environment



Reproduction

  1. create any project using nuxt/content,
  2. do a deploy (or npm run generate),
  3. run a page (npm run preview),
  4. open website, go to some page,
  5. do a new deploy (npm run generate),
  6. run the page again (npm run preview),
  7. 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

gitFoxCode avatar Jul 04 '23 14:07 gitFoxCode

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.

PatrickMcGrath29 avatar Aug 23 '24 12:08 PatrickMcGrath29

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.

github-actions[bot] avatar Dec 10 '24 16:12 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity.

github-actions[bot] avatar Jan 09 '25 17:01 github-actions[bot]