content
content copied to clipboard
Why does Nuxt Content display "content not found" after refreshing the page using F5, whereas it functions properly during the initial visit?
Environment
- Operating System: Windows_NT
- Node Version: v18.16.0
- Nuxt Version: 3.7.0
- CLI Version: 3.7.3
- Nitro Version: 2.6.2
- Package Manager: [email protected]
- Builder: -
- User Config: modules, app, css, srcDir, runtimeConfig, routeRules, router, hooks, build, vite, nitro, vueuse, unocss
- Runtime Modules: @vueuse/[email protected], @unocss/[email protected], @nuxt/[email protected]
- Build Modules: -
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
also with warn:
WARN [nuxt] Two component files resolving to the same name ProseCode: 13:58:41
- D:/Nuxt3-Apps/ai-tools-app/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseCode.vue
- D:/Nuxt3-Apps/ai-tools-app/node_modules/@nuxt/content/dist/runtime/components/Prose/ProseCode.vue
if i set render mode to prerender, content not found too.
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.
I have no idea why the error happens, but sometimes you just need to remove the .nuxt
directory
This is still broken.
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
Weirdly enough, I'm getting the opposite. Works on refresh but gives me a not found error on routing via NuxtLink
Hello. Any update on this ? I m facing the exact same problem with nuxt 3
My middleware was blocking the request on the api/_content
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.
you're welcome ;)