nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.12k stars 623 forks source link

Why does Nuxt Content display "content not found" after refreshing the page using F5, whereas it functions properly during the initial visit? #2378

Open TangsWang opened 1 year ago

TangsWang commented 1 year ago

Environment


Reproduction

just install @nuxt/content and use official template, set page to ssr.

Describe the bug

Nuxt Content display "content not found" after refreshing the page using F5, whereas it functions properly during the initial visit

Additional context

No response

Logs

No response

TangsWang commented 1 year ago

also with warn:

WARN [nuxt] Two component files resolving to the same name ProseCode: 13:58:41

TangsWang commented 1 year ago

if i set render mode to prerender, content not found too.

popdo commented 1 year ago

I encountered the same issue in nuxt 3.8. After enabling document mode and refreshing the page, it shows "content not found". Clicking on the routes displays the content correctly, so it seems to be an issue with SSR (Server-Side Rendering). I had to roll back to nuxt 3.74 where everything works fine.

natanfeitosa commented 1 year ago

I have no idea why the error happens, but sometimes you just need to remove the .nuxt directory

bryancurran commented 8 months ago

This is still broken.

mklueh commented 7 months ago

Jepp, still broken, but only after deploying the static site while in dev all works fine.

Refreshing the page will suddenly show the content, but during routing it is not working

raf202 commented 5 months ago

Weirdly enough, I'm getting the opposite. Works on refresh but gives me a not found error on routing via NuxtLink

devstack-be commented 4 months ago

Hello. Any update on this ? I m facing the exact same problem with nuxt 3

devstack-be commented 4 months ago

My middleware was blocking the request on the api/_content

Simlor commented 3 months ago

My middleware was blocking the request on the api/_content

Thx devstack-be for the middleware hint! ^^ I had basic auth via the Nuxt Security module enabled and apparently this blocked the Content API Route during SSR / site refresh.

devstack-be commented 3 months ago

you're welcome ;)

llds66 commented 2 months ago

Hello. Any update on this ? I m facing the exact same problem with nuxt 3

How to solve it? The ContentList of my development environment refreshes normally, and after deployment it refreshes No articles found.

github-actions[bot] commented 1 week ago

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.